blob: 90b7847b31d6a862d5c4ae320d3030a93ded5d3f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
using System;
using IOL.Fagprove.Utilities;
using Xunit;
namespace PIT.ReservationService.Tests
{
public class PasswordHasherTests
{
[Fact]
public void ThrowsGivenEmptyString()
{
Assert.Throws<ArgumentException>(() => PasswordHasher.HashPassword(""));
}
[Fact]
public void WorksGivenNonEmptyString()
{
var passwordHash = PasswordHasher.HashPassword("alksjhfoiuq");
Assert.False(string.IsNullOrWhiteSpace(passwordHash));
}
}
}
|