25 lines
510 B
C#
25 lines
510 B
C#
using StellaOps.Cryptography;
|
|
|
|
namespace StellaOps.Cryptography.Tests;
|
|
|
|
public class PasswordHashOptionsTests
|
|
{
|
|
[Fact]
|
|
public void Validate_DoesNotThrow_ForDefaults()
|
|
{
|
|
var options = new PasswordHashOptions();
|
|
options.Validate();
|
|
}
|
|
|
|
[Fact]
|
|
public void Validate_Throws_WhenMemoryInvalid()
|
|
{
|
|
var options = new PasswordHashOptions
|
|
{
|
|
MemorySizeInKib = 0
|
|
};
|
|
|
|
Assert.Throws<InvalidOperationException>(options.Validate);
|
|
}
|
|
}
|