Initial commit (history squashed)
This commit is contained in:
		
							
								
								
									
										24
									
								
								src/StellaOps.Cryptography.Tests/PasswordHashOptionsTests.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								src/StellaOps.Cryptography.Tests/PasswordHashOptionsTests.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
			
		||||
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);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user