mirror of
https://github.com/bitwarden/server.git
synced 2026-02-01 22:53:12 +08:00
23 lines
555 B
C#
23 lines
555 B
C#
|
|
#nullable enable
|
|||
|
|
|
|||
|
|
using Bit.Api.KeyManagement.Models.Requests;
|
|||
|
|
using Xunit;
|
|||
|
|
|
|||
|
|
namespace Bit.Api.Test.KeyManagement.Models.Request;
|
|||
|
|
|
|||
|
|
public class SignatureKeyPairRequestModelTests
|
|||
|
|
{
|
|||
|
|
[Fact]
|
|||
|
|
public void ToSignatureKeyPairData_WrongAlgorithm_Rejects()
|
|||
|
|
{
|
|||
|
|
var model = new SignatureKeyPairRequestModel
|
|||
|
|
{
|
|||
|
|
SignatureAlgorithm = "abc",
|
|||
|
|
WrappedSigningKey = "wrappedKey",
|
|||
|
|
VerifyingKey = "verifyingKey"
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
Assert.Throws<ArgumentException>(() => model.ToSignatureKeyPairData());
|
|||
|
|
}
|
|||
|
|
}
|