-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump Microsoft.IdentityModel.* from 6.21 to 6.22
Improved code coverage result
- Loading branch information
Showing
19 changed files
with
607 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/Abc.IdentityServer4.WsFederationTests/Abc.IdentityServer4.WsFederationTests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
|
||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" /> | ||
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" /> | ||
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" /> | ||
<PackageReference Include="coverlet.collector" Version="3.1.2" /> | ||
</ItemGroup> | ||
|
||
</Project> |
8 changes: 8 additions & 0 deletions
8
src/Abc.IdentityServer4.WsFederationTests/Events/SignInTokenIssuedSuccessEventFixture.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Abc.IdentityServer4.WsFederationTests.Events { | ||
internal class SignInTokenIssuedSuccessEventFixture { | ||
} | ||
} |
82 changes: 82 additions & 0 deletions
82
...Abc.IdentityServer4.WsFederation.UnitTests/Events/SignInTokenIssuedFailureEventFixture.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
using Abc.IdentityServer4.WsFederation.Validation; | ||
using FluentAssertions; | ||
using IdentityServer4; | ||
using IdentityServer4.Events; | ||
using IdentityServer4.Models; | ||
using Xunit; | ||
|
||
namespace Abc.IdentityServer4.WsFederation.Events.UnitTests | ||
{ | ||
public class SignInTokenIssuedFailureEventFixture | ||
{ | ||
private const string Error = "some_error"; | ||
private const string Description = "some_description"; | ||
|
||
[Fact] | ||
public void Ctor_SignInTokenIssuedFailureEvent_null_request() | ||
{ | ||
var target = new SignInTokenIssuedFailureEvent(null, Error, Description); | ||
|
||
target.Error.Should().Be(Error); | ||
target.ErrorDescription.Should().Be(Description); | ||
target.Endpoint.Should().Be("WsFederation"); | ||
target.SubjectId.Should().BeNull(); | ||
target.ClientId.Should().BeNull(); | ||
target.ClientName.Should().BeNull(); | ||
target.Scopes.Should().BeNull(); | ||
} | ||
|
||
[Fact] | ||
public void Ctor_SignInTokenIssuedFailureEvent_empty_request() | ||
{ | ||
var request = new ValidatedWsFederationRequest() | ||
{ | ||
|
||
}; | ||
|
||
var target = new SignInTokenIssuedFailureEvent(request, Error, Description); | ||
|
||
target.Error.Should().Be(Error); | ||
target.ErrorDescription.Should().Be(Description); | ||
target.Endpoint.Should().Be("WsFederation"); | ||
target.SubjectId.Should().BeNull(); | ||
target.ClientId.Should().BeNull(); | ||
target.ClientName.Should().BeNull(); | ||
target.Scopes.Should().BeNull(); | ||
} | ||
|
||
[Fact] | ||
public void Ctor_SignInTokenIssuedFailureEvent_success_request() | ||
{ | ||
var request = new ValidatedWsFederationRequest() | ||
{ | ||
ClientId = "client", | ||
Client = new Client() | ||
{ | ||
ClientId = "client", | ||
ClientName = "clientName", | ||
}, | ||
Subject = new IdentityServerUser("bob").CreatePrincipal(), | ||
}; | ||
|
||
var target = new SignInTokenIssuedFailureEvent(request, Error, Description); | ||
|
||
target.Error.Should().Be(Error); | ||
target.ErrorDescription.Should().Be(Description); | ||
target.Endpoint.Should().Be("WsFederation"); | ||
target.SubjectId.Should().Be("bob"); | ||
target.ClientId.Should().Be("client"); | ||
target.ClientName.Should().Be("clientName"); | ||
target.Scopes.Should().BeNull(); | ||
|
||
target.Category.Should().Be("Token"); | ||
target.Message.Should().BeNull(); | ||
target.Id.Should().Be(2001); | ||
target.Name.Should().Be("Token Issued Failure"); | ||
target.EventType.Should().Be(EventTypes.Failure); | ||
|
||
target.ActivityId.Should().BeNull(); | ||
target.GrantType.Should().BeNull(); | ||
} | ||
} | ||
} |
Oops, something went wrong.