28 lines
829 B
C#
28 lines
829 B
C#
using FluentAssertions;
|
|
using Xunit;
|
|
namespace StellaOps.Cryptography.Tests;
|
|
public sealed partial class BouncyCastleCapabilityDetectionTests
|
|
{
|
|
[Fact]
|
|
public void GetHasher_ThrowsNotSupported()
|
|
{
|
|
Action act = () => _provider.GetHasher("SHA-256");
|
|
|
|
act.Should().Throw<NotSupportedException>()
|
|
.WithMessage("*does not expose hashing capabilities*");
|
|
|
|
_output.WriteLine("✓ GetHasher throws NotSupportedException");
|
|
}
|
|
|
|
[Fact]
|
|
public void GetPasswordHasher_ThrowsNotSupported()
|
|
{
|
|
Action act = () => _provider.GetPasswordHasher("argon2id");
|
|
|
|
act.Should().Throw<NotSupportedException>()
|
|
.WithMessage("*does not expose password hashing capabilities*");
|
|
|
|
_output.WriteLine("✓ GetPasswordHasher throws NotSupportedException");
|
|
}
|
|
}
|