summaryrefslogtreecommitdiffstats
path: root/tests/IOL.Fagprove.Tests/CryptographyTests.cs
diff options
context:
space:
mode:
authorivar <i@oiee.no>2025-10-19 23:41:23 +0200
committerivar <i@oiee.no>2025-10-19 23:41:23 +0200
commit3f4c0720e1e3421431e7baa20882a4a4512a7fab (patch)
tree734ca81d7d0841d8863e3f523ebba14c282dc681 /tests/IOL.Fagprove.Tests/CryptographyTests.cs
downloadfagprove-master.tar.xz
fagprove-master.zip
InitialHEADmaster
Diffstat (limited to 'tests/IOL.Fagprove.Tests/CryptographyTests.cs')
-rw-r--r--tests/IOL.Fagprove.Tests/CryptographyTests.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/IOL.Fagprove.Tests/CryptographyTests.cs b/tests/IOL.Fagprove.Tests/CryptographyTests.cs
new file mode 100644
index 0000000..9bd3f66
--- /dev/null
+++ b/tests/IOL.Fagprove.Tests/CryptographyTests.cs
@@ -0,0 +1,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);
+ }
+ }
+} \ No newline at end of file