diff --git a/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/ApiResourceMappers.cs b/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/ApiResourceMappers.cs index f194b306e..14f652c56 100644 --- a/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/ApiResourceMappers.cs +++ b/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/ApiResourceMappers.cs @@ -19,7 +19,7 @@ public void CanMapApiResourceApiDtoToApiResourceDto() apiResourceDto.Should().NotBeNull(); - apiResourceApiDto.ShouldBeEquivalentTo(apiResourceDto); + apiResourceDto.Should().BeEquivalentTo(apiResourceApiDto); } [Fact] @@ -29,7 +29,7 @@ public void CanMapApiResourceDtoToApiResourceApiDto() var apiResourceApiDto = apiResourceDto.ToApiResourceApiModel(); - apiResourceDto.ShouldBeEquivalentTo(apiResourceApiDto, options => options + apiResourceApiDto.Should().BeEquivalentTo(apiResourceDto, options => options .Excluding(x => x.AllowedAccessTokenSigningAlgorithmsItems) .Excluding(x=> x.ScopesItems) .Excluding(x=> x.UserClaimsItems)); @@ -44,7 +44,7 @@ public void CanMapApiResourceSecretApiDtoToApiResourceSecretDto() apiSecretApiDto.Id.Should().Be(apiSecretsDto.ApiSecretId); - apiSecretApiDto.ShouldBeEquivalentTo(apiSecretsDto, options => options.Excluding(x=> x.Id)); + apiSecretsDto.Should().BeEquivalentTo(apiSecretApiDto, options => options.Excluding(x=> x.Id)); } [Fact] @@ -56,7 +56,7 @@ public void CanMapApiResourceSecretDtoToApiResourceSecretApiDto() apiResourceSecret.ApiResourceId.Should().Be(apiResourceApiDto.Id); - apiResourceSecret.ShouldBeEquivalentTo(apiResourceApiDto, options => + apiResourceApiDto.Should().BeEquivalentTo(apiResourceSecret, options => options.Excluding(x => x.ApiResourceId) .Excluding(x => x.ApiSecrets) .Excluding(x => x.ApiResourceName) @@ -77,7 +77,7 @@ public void CanMapApiResourcePropertyApiDtoToApiResourcePropertyDto() apiResourcePropertyApiDto.Id.Should().Be(apiResourcePropertiesDto.ApiResourcePropertyId); - apiResourcePropertyApiDto.ShouldBeEquivalentTo(apiResourcePropertiesDto, options => options.Excluding(x=> x.Id)); + apiResourcePropertiesDto.Should().BeEquivalentTo(apiResourcePropertyApiDto, options => options.Excluding(x=> x.Id)); } [Fact] @@ -89,7 +89,7 @@ public void CanMapApiResourcePropertyDtoToApiResourcePropertyApiDto() apiResourcePropertyDto.ApiResourcePropertyId.Should().Be(apiResourcePropertyApiDto.Id); - apiResourcePropertyDto.ShouldBeEquivalentTo(apiResourcePropertyApiDto, options => + apiResourcePropertyApiDto.Should().BeEquivalentTo(apiResourcePropertyDto, options => options.Excluding(x => x.ApiResourceId) .Excluding(x => x.ApiResourceName) .Excluding(x => x.PageSize) diff --git a/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/ApiScopeMappers.cs b/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/ApiScopeMappers.cs index 340c81e75..c3c805f74 100644 --- a/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/ApiScopeMappers.cs +++ b/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/ApiScopeMappers.cs @@ -17,7 +17,7 @@ public void CanMapApiScopeApiDtoToApiScopeDto() var apiScopeDto = apiScopeApiDto.ToApiScopeApiModel(); - apiScopeApiDto.ShouldBeEquivalentTo(apiScopeDto, options => options.Excluding(x=> x.ApiScopeProperties)); + apiScopeDto.Should().BeEquivalentTo(apiScopeApiDto, options => options.Excluding(x=> x.ApiScopeProperties)); } [Fact] @@ -27,7 +27,7 @@ public void CanMapApiScopeDtoToApiScopeApiDto() var apiScopeApiDto = apiScopeDto.ToApiScopeApiModel(); - apiScopeDto.ShouldBeEquivalentTo(apiScopeApiDto, options => options + apiScopeApiDto.Should().BeEquivalentTo(apiScopeDto, options => options .Excluding(x => x.ApiScopeProperties) .Excluding(x=> x.UserClaimsItems)); } @@ -39,7 +39,7 @@ public void CanMapApiScopePropertyApiDtoToApiScopePropertyDto() var apiScopePropertyDto = apiScopePropertyApiDto.ToApiScopeApiModel(); - apiScopePropertyApiDto.ShouldBeEquivalentTo(apiScopePropertyDto); + apiScopePropertyDto.Should().BeEquivalentTo(apiScopePropertyApiDto); } [Fact] @@ -49,7 +49,7 @@ public void CanMapApiScopePropertyDtoToApiScopePropertyDto() var apiScopePropertyApiDto = apiScopePropertyDto.ToApiScopeApiModel(); - apiScopePropertyDto.ShouldBeEquivalentTo(apiScopePropertyApiDto, options => + apiScopePropertyApiDto.Should().BeEquivalentTo(apiScopePropertyDto, options => options.Excluding(x => x.ApiScopeId) .Excluding(x => x.ApiScopeName) .Excluding(x => x.PageSize) diff --git a/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/ClientMappers.cs b/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/ClientMappers.cs index d674389d5..08d72e7cb 100644 --- a/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/ClientMappers.cs +++ b/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/ClientMappers.cs @@ -20,7 +20,7 @@ public void CanMapClientApiDtoToClientDto() clientDto.Should().NotBeNull(); - clientApiDto.ShouldBeEquivalentTo(clientDto); + clientDto.Should().BeEquivalentTo(clientApiDto); } [Fact] @@ -33,7 +33,7 @@ public void CanMapClientDtoToClientApiDto() clientDto.Should().NotBeNull(); - clientDto.ShouldBeEquivalentTo(clientApiDto, options => + clientApiDto.Should().BeEquivalentTo(clientDto, options => options.Excluding(o => o.AllowedCorsOriginsItems) .Excluding(o => o.AllowedGrantTypesItems) .Excluding(o => o.AllowedIdentityTokenSigningAlgorithmsItems) @@ -59,7 +59,7 @@ public void CanMapClientApiSecretToClientSecretDto() clientSecretApi.Id.Should().Be(clientSecretsDto.ClientSecretId); - clientSecretApi.ShouldBeEquivalentTo(clientSecretsDto, options => options.Excluding(x => x.Id)); + clientSecretsDto.Should().BeEquivalentTo(clientSecretApi, options => options.Excluding(x => x.Id)); } [Fact] @@ -71,7 +71,7 @@ public void CanMapClientSecretDtoToClientSecretApiDto() clientSecretDto.ClientSecretId.Should().Be(clientSecretApiDto.Id); - clientSecretDto.ShouldBeEquivalentTo(clientSecretApiDto, options => + clientSecretApiDto.Should().BeEquivalentTo(clientSecretDto, options => options.Excluding(x => x.ClientId) .Excluding(x => x.ClientSecrets) .Excluding(x => x.ClientName) @@ -92,7 +92,7 @@ public void CanMapClientClaimApiDtoToClientClaimDto() clientClaimApiDto.Id.Should().Be(clientClaimsDto.ClientClaimId); - clientClaimApiDto.ShouldBeEquivalentTo(clientClaimsDto, options => options.Excluding(x => x.Id)); + clientClaimsDto.Should().BeEquivalentTo(clientClaimApiDto, options => options.Excluding(x => x.Id)); } [Fact] @@ -104,7 +104,7 @@ public void CanMapClientClaimDtoToClientClaimApiDto() clientClaimDto.ClientClaimId.Should().Be(clientClaimApiDto.Id); - clientClaimDto.ShouldBeEquivalentTo(clientClaimApiDto, options => + clientClaimApiDto.Should().BeEquivalentTo(clientClaimDto, options => options.Excluding(x => x.ClientClaims) .Excluding(x => x.PageSize) .Excluding(x => x.TotalCount) @@ -121,8 +121,8 @@ public void CanMapClientPropertyApiDtoToClientPropertyDto() var clientPropertiesDto = clientPropertyApiDto.ToClientApiModel(); clientPropertyApiDto.Id.Should().Be(clientPropertiesDto.ClientPropertyId); - - clientPropertyApiDto.ShouldBeEquivalentTo(clientPropertiesDto, options => options.Excluding(x => x.Id)); + + clientPropertiesDto.Should().BeEquivalentTo(clientPropertyApiDto, options => options.Excluding(x => x.Id)); } [Fact] @@ -134,7 +134,7 @@ public void CanMapClientPropertyDtoToClientPropertyApiDto() clientPropertyDto.ClientPropertyId.Should().Be(clientPropertyApiDto.Id); - clientPropertyDto.ShouldBeEquivalentTo(clientPropertyApiDto, options => + clientPropertyApiDto.Should().BeEquivalentTo(clientPropertyDto, options => options.Excluding(x=> x.ClientId) .Excluding(x=> x.ClientName) .Excluding(x=> x.PageSize) diff --git a/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/IdentityResourceMappers.cs b/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/IdentityResourceMappers.cs index 7b55e0757..03ce58595 100644 --- a/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/IdentityResourceMappers.cs +++ b/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/IdentityResourceMappers.cs @@ -20,7 +20,7 @@ public void CanMapIdentityResourceApiDtoToIdentityResourceDto() identityResourceDto.Should().NotBeNull(); - identityResourceApiDto.ShouldBeEquivalentTo(identityResourceDto); + identityResourceDto.Should().BeEquivalentTo(identityResourceApiDto); } [Fact] @@ -30,7 +30,7 @@ public void CanMapIdentityResourceDtoToIdentityResourceApiDto() var identityResourceApiDto = identityResourceDto.ToIdentityResourceApiModel(); - identityResourceDto.ShouldBeEquivalentTo(identityResourceApiDto, options => options + identityResourceApiDto.Should().BeEquivalentTo(identityResourceDto, options => options .Excluding(x => x.UserClaimsItems)); } @@ -43,7 +43,7 @@ public void CanMapIdentityResourcePropertyApiDtoToIdentityResourcePropertyDto() identityResourcePropertyApiDto.Id.Should().Be(identityResourcePropertiesDto.IdentityResourcePropertyId); - identityResourcePropertyApiDto.ShouldBeEquivalentTo(identityResourcePropertiesDto, options => options.Excluding(x => x.Id)); + identityResourcePropertiesDto.Should().BeEquivalentTo(identityResourcePropertyApiDto, options => options.Excluding(x => x.Id)); } [Fact] @@ -55,7 +55,7 @@ public void CanMapIdentityResourcePropertyDtoToIdentityResourcePropertyApiDto() identityResourcePropertyDto.IdentityResourcePropertyId.Should().Be(identityResourcePropertyApiDto.Id); - identityResourcePropertyDto.ShouldBeEquivalentTo(identityResourcePropertyApiDto, options => + identityResourcePropertyApiDto.Should().BeEquivalentTo(identityResourcePropertyDto, options => options.Excluding(x => x.IdentityResourceId) .Excluding(x => x.IdentityResourceName) .Excluding(x => x.PageSize) diff --git a/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/KeyMappers.cs b/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/KeyMappers.cs index 24c16f489..475b29d4a 100644 --- a/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/KeyMappers.cs +++ b/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/KeyMappers.cs @@ -18,7 +18,7 @@ public void CanMapKeyDtoToKayApiDto() var keyApi = keyDto.ToKeyApiModel(); - keyDto.ShouldBeEquivalentTo(keyApi); + keyApi.Should().BeEquivalentTo(keyDto); } [Fact] @@ -28,7 +28,7 @@ public void CanMapKeyApiDtoToKeyDto() var keyDto = keyApiDto.ToKeyApiModel(); - keyApiDto.ShouldBeEquivalentTo(keyDto); + keyDto.Should().BeEquivalentTo(keyApiDto); } } } \ No newline at end of file diff --git a/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/PersistedGrantMappers.cs b/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/PersistedGrantMappers.cs index df8befb0e..f90ee4e2f 100644 --- a/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/PersistedGrantMappers.cs +++ b/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Mappers/PersistedGrantMappers.cs @@ -21,7 +21,7 @@ public void CanMapPersistedGrantDtoToPersistedGrantSubjectsApiDto() var persistedGrantSubjectsApiDto = persistedGrantsDto.ToPersistedGrantApiModel(); - persistedGrantsDto.ShouldBeEquivalentTo(persistedGrantSubjectsApiDto, options => options.Excluding(x=> x.SubjectId)); + persistedGrantSubjectsApiDto.Should().BeEquivalentTo(persistedGrantsDto, options => options.Excluding(x=> x.SubjectId)); } [Fact] @@ -35,7 +35,7 @@ public void CanMapPersistedGrantDtoToPersistedGrantsApiDto() var persistedGrantsApiDto = persistedGrantsDto.ToPersistedGrantApiModel(); - persistedGrantsDto.ShouldBeEquivalentTo(persistedGrantsApiDto, options => options.Excluding(x => x.SubjectId)); + persistedGrantsApiDto.Should().BeEquivalentTo(persistedGrantsDto, options => options.Excluding(x => x.SubjectId)); } [Fact] @@ -45,7 +45,7 @@ public void CanMapPersistedGrantDtoToPersistedGrantApiDto() var persistedGrantApiDto = persistedGrantDto.ToPersistedGrantApiModel(); - persistedGrantDto.ShouldBeEquivalentTo(persistedGrantApiDto, options => options.Excluding(x => x.SubjectId)); + persistedGrantApiDto.Should().BeEquivalentTo(persistedGrantDto, options => options.Excluding(x => x.SubjectId)); } } } \ No newline at end of file diff --git a/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests.csproj b/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests.csproj index 162740e2b..6ba1e743b 100644 --- a/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests.csproj +++ b/tests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests/Skoruba.Duende.IdentityServer.Admin.Api.UnitTests.csproj @@ -14,7 +14,7 @@ - +