Added .net standard 2.0 and .net framework 4.8 support
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
using FluentAssertions;
|
||||
using SecureToken.Core;
|
||||
using SecureToken.Cryptography;
|
||||
using SecureToken.Validation;
|
||||
using EonaCat.SecureToken.Core;
|
||||
using EonaCat.SecureToken.Cryptography;
|
||||
using EonaCat.SecureToken.Validation;
|
||||
using Xunit;
|
||||
|
||||
namespace SecureToken.Tests
|
||||
namespace EonaCat.SecureToken.Tests
|
||||
{
|
||||
public sealed class TokenServiceTests
|
||||
{
|
||||
private static ITokenService CreateService(SigningKeyStore? store = null) =>
|
||||
new TokenService(store ?? SigningKeyStore.CreateNew());
|
||||
|
||||
// ── Issue & Validate ─────────────────────────────────────────────────────
|
||||
|
||||
// Issue & Validate
|
||||
[Fact]
|
||||
public void Issue_And_Validate_ReturnsSuccess()
|
||||
{
|
||||
@@ -142,8 +141,7 @@ namespace SecureToken.Tests
|
||||
result.IsSuccess.Should().BeTrue();
|
||||
}
|
||||
|
||||
// ── Key Rotation ─────────────────────────────────────────────────────────
|
||||
|
||||
// Key Rotation
|
||||
[Fact]
|
||||
public void KeyRotation_OldTokensRemainValid()
|
||||
{
|
||||
@@ -186,8 +184,7 @@ namespace SecureToken.Tests
|
||||
result.IsSuccess.Should().BeTrue();
|
||||
}
|
||||
|
||||
// ── Token Pair ───────────────────────────────────────────────────────────
|
||||
|
||||
// Token Pair
|
||||
[Fact]
|
||||
public void IssueTokenPair_ProducesValidPair()
|
||||
{
|
||||
@@ -213,8 +210,7 @@ namespace SecureToken.Tests
|
||||
result.Should().BeOfType<TokenResult.WrongTokenType>();
|
||||
}
|
||||
|
||||
// ── Revocation ───────────────────────────────────────────────────────────
|
||||
|
||||
// Revocation
|
||||
[Fact]
|
||||
public async Task RevocationCheck_RevokedToken_ReturnsRevoked()
|
||||
{
|
||||
@@ -237,8 +233,7 @@ namespace SecureToken.Tests
|
||||
result.Should().BeOfType<TokenResult.Revoked>();
|
||||
}
|
||||
|
||||
// ── Inspect (no signature check) ─────────────────────────────────────────
|
||||
|
||||
// Inspect (no signature check)
|
||||
[Fact]
|
||||
public void Inspect_MalformedToken_ReturnsNull()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user