summaryrefslogtreecommitdiffstats
path: root/tests/IOL.Fagprove.Tests/CryptographyTests.cs
blob: 9bd3f66279cd13bc56270bceeb9b3bc927cc9655 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System.Text.RegularExpressions;
using IOL.Fagprove.Utilities;
using Xunit;

namespace PIT.ReservationService.Tests
{
    public class CryptographyTests
    {
        [Fact]
        public void ReturnsDefaultLength()
        {
            var randomString = Cryptography.RandomString();
            Assert.True(randomString.Length == 12);
        }

        [Fact]
        public void ReturnsSpecifiedLength()
        {
            var length = 365;
            var randomString = Cryptography.RandomString(length);
            Assert.True(randomString.Length == length);
        }
    }
}