-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathEncryptionMethodTests.cs
More file actions
35 lines (30 loc) · 903 Bytes
/
EncryptionMethodTests.cs
File metadata and controls
35 lines (30 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using SimpleOAuth.Internal;
namespace SimpleOAuth.Tests;
public class EncryptionMethodTests
{
[Fact]
public void Plain_HasCorrectDescription()
{
var description = EncryptionMethod.Plain.GetDescription();
Assert.Equal("PLAINTEXT", description);
}
[Fact]
public void HMACSHA1_HasCorrectDescription()
{
var description = EncryptionMethod.HMACSHA1.GetDescription();
Assert.Equal("HMAC-SHA1", description);
}
[Fact]
public void HMACSHA1_HasSignatureType()
{
var signatureType = EncryptionMethod.HMACSHA1.GetSignatureType();
Assert.NotNull(signatureType);
Assert.Equal(typeof(Generators.HmacSha1Generator), signatureType);
}
[Fact]
public void Plain_HasNoSignatureType()
{
var signatureType = EncryptionMethod.Plain.GetSignatureType();
Assert.Null(signatureType);
}
}