Removes FluentAssertions library from test projects, due to licensing changes

This commit is contained in:
BinaryAlley committed 2025-02-03 00:31:15 +02:00
1 parent c1100e5398
commit d46bfae4fc
235 files changed
+4468 -4725

No files matched your search

@@ -1,7 +1,6 @@
#region ========================================================================= USING =====================================================================================
using ErrorOr;
using FastEndpoints;
using FluentAssertions;
using Lumina.Application.Core.UsersManagement.Authentication.Commands.ChangePassword;
using Lumina.Contracts.Requests.Authentication;
using Lumina.Contracts.Responses.Authentication;
@@ -53,8 +52,8 @@ public class ChangePasswordEndpointTests
IResult result = await _sut.ExecuteAsync(request, cancellationToken);
// Assert
Ok<ChangePasswordResponse> okResult = result.Should().BeOfType<Ok<ChangePasswordResponse>>().Subject;
okResult.Value.Should().BeEquivalentTo(expectedResponse);
Ok<ChangePasswordResponse> okResult = Assert.IsType<Ok<ChangePasswordResponse>>(result);
Assert.Equal(expectedResponse, okResult.Value);
}
[Fact]
@@ -71,21 +70,15 @@ public class ChangePasswordEndpointTests
IResult result = await _sut.ExecuteAsync(request, cancellationToken);
// Assert
result.Should().BeOfType<ProblemHttpResult>();
ProblemHttpResult problemDetails = (ProblemHttpResult)result;
problemDetails.StatusCode.Should().Be(StatusCodes.Status422UnprocessableEntity);
problemDetails.ContentType.Should().Be("application/problem+json");
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
validationProblemDetails.Title.Should().Be("General.Validation");
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
validationProblemDetails.Errors.Should().ContainSingle()
.Which.Should().BeEquivalentTo(new
{
Key = "Password.Invalid",
Value = new[] { "The current password is incorrect." }
});
ProblemHttpResult problemDetails = Assert.IsType<ProblemHttpResult>(result);
Assert.Equal(StatusCodes.Status422UnprocessableEntity, problemDetails.StatusCode);
Assert.Equal("application/problem+json", problemDetails.ContentType);
HttpValidationProblemDetails validationProblemDetails = Assert.IsType<HttpValidationProblemDetails>(problemDetails.ProblemDetails);
Assert.Equal(StatusCodes.Status422UnprocessableEntity, validationProblemDetails.Status);
Assert.Equal("General.Validation", validationProblemDetails.Title);
Assert.Equal("https://tools.ietf.org/html/rfc4918#section-11.2", validationProblemDetails.Type);
Assert.Single(validationProblemDetails.Errors);
Assert.Equal(new[] { "The current password is incorrect." }, validationProblemDetails.Errors["Password.Invalid"]);
}
[Fact]
@@ -1,7 +1,6 @@
#region ========================================================================= USING =====================================================================================
using ErrorOr;
using FastEndpoints;
using FluentAssertions;
using Lumina.Application.Core.UsersManagement.Authentication.Queries.GetUsers;
using Lumina.Contracts.Responses.UsersManagement.Users;
using Lumina.Presentation.Api.Core.Endpoints.UsersManagement.Authentication.GetUsers;
@@ -51,8 +50,8 @@ public class GetUsersEndpointTests
IResult result = await _sut.ExecuteAsync(new EmptyRequest(), cancellationToken);
// Assert
Ok<IEnumerable<UserResponse>> okResult = result.Should().BeOfType<Ok<IEnumerable<UserResponse>>>().Subject;
okResult.Value.Should().BeEquivalentTo(expectedResponse);
Ok<IEnumerable<UserResponse>> okResult = Assert.IsType<Ok<IEnumerable<UserResponse>>>(result);
Assert.Equal(expectedResponse, okResult.Value);
}
[Fact]
@@ -68,16 +67,16 @@ public class GetUsersEndpointTests
IResult result = await _sut.ExecuteAsync(new EmptyRequest(), cancellationToken);
// Assert
ProblemHttpResult problemResult = result.Should().BeOfType<ProblemHttpResult>().Subject;
problemResult.StatusCode.Should().Be(StatusCodes.Status403Forbidden);
problemResult.ContentType.Should().Be("application/problem+json");
problemResult.ProblemDetails.Should().BeOfType<Microsoft.AspNetCore.Mvc.ProblemDetails>();
ProblemHttpResult problemResult = Assert.IsType<ProblemHttpResult>(result);
Assert.Equal(StatusCodes.Status403Forbidden, problemResult.StatusCode);
Assert.Equal("application/problem+json", problemResult.ContentType);
Assert.IsType<Microsoft.AspNetCore.Mvc.ProblemDetails>(problemResult.ProblemDetails);
problemResult.ProblemDetails.Title.Should().Be("Users.NotFound");
problemResult.ProblemDetails.Detail.Should().Be("No users found.");
problemResult.ProblemDetails.Status.Should().Be(StatusCodes.Status403Forbidden);
problemResult.ProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc9110#section-15.5.4");
problemResult.ProblemDetails.Extensions["traceId"].Should().NotBeNull();
Assert.Equal("Users.NotFound", problemResult.ProblemDetails.Title);
Assert.Equal("No users found.", problemResult.ProblemDetails.Detail);
Assert.Equal(StatusCodes.Status403Forbidden, problemResult.ProblemDetails.Status);
Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.4", problemResult.ProblemDetails.Type);
Assert.NotNull(problemResult.ProblemDetails.Extensions["traceId"]);
}
[Fact]
@@ -1,7 +1,6 @@
#region ========================================================================= USING =====================================================================================
using ErrorOr;
using FastEndpoints;
using FluentAssertions;
using Lumina.Application.Core.UsersManagement.Authentication.Queries.LoginUser;
using Lumina.Contracts.Requests.Authentication;
using Lumina.Contracts.Responses.Authentication;
@@ -53,8 +52,8 @@ public class LoginEndpointTests
IResult result = await _sut.ExecuteAsync(request, cancellationToken);
// Assert
Ok<LoginResponse> okResult = result.Should().BeOfType<Ok<LoginResponse>>().Subject;
okResult.Value.Should().BeEquivalentTo(expectedResponse);
Ok<LoginResponse> okResult = Assert.IsType<Ok<LoginResponse>>(result);
Assert.Equal(expectedResponse, okResult.Value);
}
[Fact]
@@ -71,21 +70,15 @@ public class LoginEndpointTests
IResult result = await _sut.ExecuteAsync(request, cancellationToken);
// Assert
result.Should().BeOfType<ProblemHttpResult>();
ProblemHttpResult problemDetails = (ProblemHttpResult)result;
problemDetails.StatusCode.Should().Be(StatusCodes.Status422UnprocessableEntity);
problemDetails.ContentType.Should().Be("application/problem+json");
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
validationProblemDetails.Title.Should().Be("General.Validation");
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
validationProblemDetails.Errors.Should().ContainSingle()
.Which.Should().BeEquivalentTo(new
{
Key = "Login.Failed",
Value = new[] { "Invalid username or password." }
});
ProblemHttpResult problemDetails = Assert.IsType<ProblemHttpResult>(result);
Assert.Equal(StatusCodes.Status422UnprocessableEntity, problemDetails.StatusCode);
Assert.Equal("application/problem+json", problemDetails.ContentType);
HttpValidationProblemDetails validationProblemDetails = Assert.IsType<HttpValidationProblemDetails>(problemDetails.ProblemDetails);
Assert.Equal(StatusCodes.Status422UnprocessableEntity, validationProblemDetails.Status);
Assert.Equal("General.Validation", validationProblemDetails.Title);
Assert.Equal("https://tools.ietf.org/html/rfc4918#section-11.2", validationProblemDetails.Type);
Assert.Single(validationProblemDetails.Errors);
Assert.Equal(new[] { "Invalid username or password." }, validationProblemDetails.Errors["Login.Failed"]);
}
[Fact]
@@ -1,7 +1,6 @@
#region ========================================================================= USING =====================================================================================
using ErrorOr;
using FastEndpoints;
using FluentAssertions;
using Lumina.Application.Core.UsersManagement.Authentication.Commands.RecoverPassword;
using Lumina.Contracts.Requests.Authentication;
using Lumina.Contracts.Responses.Authentication;
@@ -53,8 +52,8 @@ public class RecoverPasswordEndpointTests
IResult result = await _sut.ExecuteAsync(request, cancellationToken);
// Assert
Ok<RecoverPasswordResponse> okResult = result.Should().BeOfType<Ok<RecoverPasswordResponse>>().Subject;
okResult.Value.Should().BeEquivalentTo(expectedResponse);
Ok<RecoverPasswordResponse> okResult = Assert.IsType<Ok<RecoverPasswordResponse>>(result);
Assert.Equal(expectedResponse, okResult.Value);
}
[Fact]
@@ -71,21 +70,15 @@ public class RecoverPasswordEndpointTests
IResult result = await _sut.ExecuteAsync(request, cancellationToken);
// Assert
result.Should().BeOfType<ProblemHttpResult>();
ProblemHttpResult problemDetails = (ProblemHttpResult)result;
problemDetails.StatusCode.Should().Be(StatusCodes.Status422UnprocessableEntity);
problemDetails.ContentType.Should().Be("application/problem+json");
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
validationProblemDetails.Title.Should().Be("General.Validation");
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
validationProblemDetails.Errors.Should().ContainSingle()
.Which.Should().BeEquivalentTo(new
{
Key = "Recovery.Failed",
Value = new[] { "Invalid username or TOTP code." }
});
ProblemHttpResult problemDetails = Assert.IsType<ProblemHttpResult>(result);
Assert.Equal(StatusCodes.Status422UnprocessableEntity, problemDetails.StatusCode);
Assert.Equal("application/problem+json", problemDetails.ContentType);
HttpValidationProblemDetails validationProblemDetails = Assert.IsType<HttpValidationProblemDetails>(problemDetails.ProblemDetails);
Assert.Equal(StatusCodes.Status422UnprocessableEntity, validationProblemDetails.Status);
Assert.Equal("General.Validation", validationProblemDetails.Title);
Assert.Equal("https://tools.ietf.org/html/rfc4918#section-11.2", validationProblemDetails.Type);
Assert.Single(validationProblemDetails.Errors);
Assert.Equal(new[] { "Invalid username or TOTP code." }, validationProblemDetails.Errors["Recovery.Failed"]);
}
[Fact]
@@ -1,7 +1,6 @@
#region ========================================================================= USING =====================================================================================
using ErrorOr;
using FastEndpoints;
using FluentAssertions;
using Lumina.Application.Core.UsersManagement.Authentication.Commands.RegisterUser;
using Lumina.Contracts.Requests.Authentication;
using Lumina.Contracts.Responses.Authentication;
@@ -53,9 +52,9 @@ public class RegisterEndpointTests
IResult result = await _sut.ExecuteAsync(request, cancellationToken);
// Assert
Created<RegistrationResponse> createdResult = result.Should().BeOfType<Created<RegistrationResponse>>().Subject;
createdResult.Value.Should().BeEquivalentTo(expectedResponse);
createdResult.Location.Should().EndWith(expectedResponse.Id.ToString());
Created<RegistrationResponse> createdResult = Assert.IsType<Created<RegistrationResponse>>(result);
Assert.Equal(expectedResponse, createdResult.Value);
Assert.EndsWith(expectedResponse.Id.ToString(), createdResult.Location);
}
[Fact]
@@ -72,21 +71,15 @@ public class RegisterEndpointTests
IResult result = await _sut. ExecuteAsync(request, cancellationToken);
// Assert
result.Should().BeOfType<ProblemHttpResult>();
ProblemHttpResult problemDetails = (ProblemHttpResult)result;
problemDetails.StatusCode.Should().Be(StatusCodes.Status422UnprocessableEntity);
problemDetails.ContentType.Should().Be("application/problem+json");
problemDetails.ProblemDetails.Should().BeOfType<HttpValidationProblemDetails>();
HttpValidationProblemDetails validationProblemDetails = (HttpValidationProblemDetails)problemDetails.ProblemDetails;
validationProblemDetails.Status.Should().Be(StatusCodes.Status422UnprocessableEntity);
validationProblemDetails.Title.Should().Be("General.Validation");
validationProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc4918#section-11.2");
validationProblemDetails.Errors.Should().ContainSingle()
.Which.Should().BeEquivalentTo(new
{
Key = "Registration.Failed",
Value = new[] { "Username is already taken." }
});
ProblemHttpResult problemDetails = Assert.IsType<ProblemHttpResult>(result);
Assert.Equal(StatusCodes.Status422UnprocessableEntity, problemDetails.StatusCode);
Assert.Equal("application/problem+json", problemDetails.ContentType);
HttpValidationProblemDetails validationProblemDetails = Assert.IsType<HttpValidationProblemDetails>(problemDetails.ProblemDetails);
Assert.Equal(StatusCodes.Status422UnprocessableEntity, validationProblemDetails.Status);
Assert.Equal("General.Validation", validationProblemDetails.Title);
Assert.Equal("https://tools.ietf.org/html/rfc4918#section-11.2", validationProblemDetails.Type);
Assert.Single(validationProblemDetails.Errors);
Assert.Equal(new[] { "Username is already taken." }, validationProblemDetails.Errors["Registration.Failed"]);
}
[Fact]
@@ -1,7 +1,6 @@
#region ========================================================================= USING =====================================================================================
using ErrorOr;
using FastEndpoints;
using FluentAssertions;
using Lumina.Application.Core.UsersManagement.Authorization.Queries.GetAuthorization;
using Lumina.Contracts.Requests.Authorization;
using Lumina.Contracts.Responses.Authorization;
@@ -58,8 +57,8 @@ public class GetAuthorizationEndpointTests
IResult result = await _sut.ExecuteAsync(request, cancellationToken);
// Assert
AuthorizationResponse actualResponse = result.Should().BeOfType<Ok<AuthorizationResponse>>().Subject.Value!;
actualResponse.Should().BeEquivalentTo(expectedResponse);
Ok<AuthorizationResponse> okResult = Assert.IsType<Ok<AuthorizationResponse>>(result);
Assert.Equal(expectedResponse, okResult.Value);
}
[Fact]
@@ -77,16 +76,16 @@ public class GetAuthorizationEndpointTests
IResult result = await _sut.ExecuteAsync(request, cancellationToken);
// Assert
ProblemHttpResult problemDetails = result.Should().BeOfType<ProblemHttpResult>().Subject;
problemDetails.StatusCode.Should().Be(StatusCodes.Status403Forbidden);
problemDetails.ContentType.Should().Be("application/problem+json");
problemDetails.ProblemDetails.Should().BeOfType<Microsoft.AspNetCore.Mvc.ProblemDetails>();
ProblemHttpResult problemDetails = Assert.IsType<ProblemHttpResult>(result);
Assert.Equal(StatusCodes.Status403Forbidden, problemDetails.StatusCode);
Assert.Equal("application/problem+json", problemDetails.ContentType);
Assert.IsType<Microsoft.AspNetCore.Mvc.ProblemDetails>(problemDetails.ProblemDetails);
problemDetails.ProblemDetails.Title.Should().Be("Authorization.Failed");
problemDetails.ProblemDetails.Detail.Should().Be("User is not authorized.");
problemDetails.ProblemDetails.Status.Should().Be(StatusCodes.Status403Forbidden);
problemDetails.ProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc9110#section-15.5.4");
problemDetails.ProblemDetails.Extensions["traceId"].Should().NotBeNull();
Assert.Equal("Authorization.Failed", problemDetails.ProblemDetails.Title);
Assert.Equal("User is not authorized.", problemDetails.ProblemDetails.Detail);
Assert.Equal(StatusCodes.Status403Forbidden, problemDetails.ProblemDetails.Status);
Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.4", problemDetails.ProblemDetails.Type);
Assert.NotNull(problemDetails.ProblemDetails.Extensions["traceId"]);
}
[Fact]
@@ -1,7 +1,6 @@
#region ========================================================================= USING =====================================================================================
using ErrorOr;
using FastEndpoints;
using FluentAssertions;
using Lumina.Application.Core.UsersManagement.Authorization.Queries.GetUserPermissions;
using Lumina.Contracts.Requests.Authorization;
using Lumina.Contracts.Responses.Authorization;
@@ -56,8 +55,8 @@ public class GetUserPermissionsEndpointTests
IResult result = await _sut.ExecuteAsync(request, cancellationToken);
// Assert
Ok<IEnumerable<PermissionResponse>> okResult = result.Should().BeOfType<Ok<IEnumerable<PermissionResponse>>>().Subject;
okResult.Value.Should().BeEquivalentTo(expectedResponse);
Ok<IEnumerable<PermissionResponse>> okResult = Assert.IsType<Ok<IEnumerable<PermissionResponse>>>(result);
Assert.Equal(expectedResponse, okResult.Value);
}
[Fact]
@@ -74,16 +73,16 @@ public class GetUserPermissionsEndpointTests
IResult result = await _sut.ExecuteAsync(request, cancellationToken);
// Assert
ProblemHttpResult problemResult = result.Should().BeOfType<ProblemHttpResult>().Subject;
problemResult.StatusCode.Should().Be(StatusCodes.Status403Forbidden);
problemResult.ContentType.Should().Be("application/problem+json");
problemResult.ProblemDetails.Should().BeOfType<Microsoft.AspNetCore.Mvc.ProblemDetails>();
ProblemHttpResult problemResult = Assert.IsType<ProblemHttpResult>(result);
Assert.Equal(StatusCodes.Status403Forbidden, problemResult.StatusCode);
Assert.Equal("application/problem+json", problemResult.ContentType);
Assert.IsType<Microsoft.AspNetCore.Mvc.ProblemDetails>(problemResult.ProblemDetails);
problemResult.ProblemDetails.Title.Should().Be("User.Permissions.NotFound");
problemResult.ProblemDetails.Detail.Should().Be("User permissions not found.");
problemResult.ProblemDetails.Status.Should().Be(StatusCodes.Status403Forbidden);
problemResult.ProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc9110#section-15.5.4");
problemResult.ProblemDetails.Extensions["traceId"].Should().NotBeNull();
Assert.Equal("User.Permissions.NotFound", problemResult.ProblemDetails.Title);
Assert.Equal("User permissions not found.", problemResult.ProblemDetails.Detail);
Assert.Equal(StatusCodes.Status403Forbidden, problemResult.ProblemDetails.Status);
Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.4", problemResult.ProblemDetails.Type);
Assert.NotNull(problemResult.ProblemDetails.Extensions["traceId"]);
}
[Fact]
@@ -1,7 +1,6 @@
#region ========================================================================= USING =====================================================================================
using ErrorOr;
using FastEndpoints;
using FluentAssertions;
using Lumina.Application.Core.UsersManagement.Authorization.Queries.GetUserRole;
using Lumina.Contracts.Requests.Authorization;
using Lumina.Contracts.Responses.Authorization;
@@ -50,8 +49,8 @@ public class GetUserRoleEndpointTests
IResult result = await _sut.ExecuteAsync(request, cancellationToken);
// Assert
Ok<RoleResponse> okResult = result.Should().BeOfType<Ok<RoleResponse>>().Subject;
okResult.Value.Should().BeEquivalentTo(expectedResponse);
Ok<RoleResponse> okResult = Assert.IsType<Ok<RoleResponse>>(result);
Assert.Equal(expectedResponse, okResult.Value);
}
[Fact]
@@ -68,16 +67,16 @@ public class GetUserRoleEndpointTests
IResult result = await _sut.ExecuteAsync(request, cancellationToken);
// Assert
ProblemHttpResult problemResult = result.Should().BeOfType<ProblemHttpResult>().Subject;
problemResult.StatusCode.Should().Be(StatusCodes.Status403Forbidden);
problemResult.ContentType.Should().Be("application/problem+json");
problemResult.ProblemDetails.Should().BeOfType<Microsoft.AspNetCore.Mvc.ProblemDetails>();
ProblemHttpResult problemResult = Assert.IsType<ProblemHttpResult>(result);
Assert.Equal(StatusCodes.Status403Forbidden, problemResult.StatusCode);
Assert.Equal("application/problem+json", problemResult.ContentType);
Assert.IsType<Microsoft.AspNetCore.Mvc.ProblemDetails>(problemResult.ProblemDetails);
problemResult.ProblemDetails.Title.Should().Be("User.Role.NotFound");
problemResult.ProblemDetails.Detail.Should().Be("User role not found.");
problemResult.ProblemDetails.Status.Should().Be(StatusCodes.Status403Forbidden);
problemResult.ProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc9110#section-15.5.4");
problemResult.ProblemDetails.Extensions["traceId"].Should().NotBeNull();
Assert.Equal("User.Role.NotFound", problemResult.ProblemDetails.Title);
Assert.Equal("User role not found.", problemResult.ProblemDetails.Detail);
Assert.Equal(StatusCodes.Status403Forbidden, problemResult.ProblemDetails.Status);
Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.4", problemResult.ProblemDetails.Type);
Assert.NotNull(problemResult.ProblemDetails.Extensions["traceId"]);
}
[Fact]
@@ -1,7 +1,6 @@
#region ========================================================================= USING =====================================================================================
using ErrorOr;
using FastEndpoints;
using FluentAssertions;
using Lumina.Application.Core.UsersManagement.Authorization.Commands.UpdateUserRoleAndPermissions;
using Lumina.Contracts.Requests.Authorization;
using Lumina.Contracts.Responses.Authorization;
@@ -61,8 +60,8 @@ public class UpdateUserRoleAndPermissionsEndpointTests
IResult result = await _sut.ExecuteAsync(request, cancellationToken);
// Assert
Ok<AuthorizationResponse> okResult = result.Should().BeOfType<Ok<AuthorizationResponse>>().Subject;
okResult.Value.Should().BeEquivalentTo(expectedResponse);
Ok<AuthorizationResponse> okResult = Assert.IsType<Ok<AuthorizationResponse>>(result);
Assert.Equal(expectedResponse, okResult.Value);
}
[Fact]
@@ -83,16 +82,16 @@ public class UpdateUserRoleAndPermissionsEndpointTests
IResult result = await _sut.ExecuteAsync(request, cancellationToken);
// Assert
ProblemHttpResult problemResult = result.Should().BeOfType<ProblemHttpResult>().Subject;
problemResult.StatusCode.Should().Be(StatusCodes.Status403Forbidden);
problemResult.ContentType.Should().Be("application/problem+json");
problemResult.ProblemDetails.Should().BeOfType<Microsoft.AspNetCore.Mvc.ProblemDetails>();
ProblemHttpResult problemResult = Assert.IsType<ProblemHttpResult>(result);
Assert.Equal(StatusCodes.Status403Forbidden, problemResult.StatusCode);
Assert.Equal("application/problem+json", problemResult.ContentType);
Assert.IsType<Microsoft.AspNetCore.Mvc.ProblemDetails>(problemResult.ProblemDetails);
problemResult.ProblemDetails.Title.Should().Be("Authorization.Update.Failed");
problemResult.ProblemDetails.Detail.Should().Be("Failed to update user role and permissions.");
problemResult.ProblemDetails.Status.Should().Be(StatusCodes.Status403Forbidden);
problemResult.ProblemDetails.Type.Should().Be("https://tools.ietf.org/html/rfc9110#section-15.5.4");
problemResult.ProblemDetails.Extensions["traceId"].Should().NotBeNull();
Assert.Equal("Authorization.Update.Failed", problemResult.ProblemDetails.Title);
Assert.Equal("Failed to update user role and permissions.", problemResult.ProblemDetails.Detail);
Assert.Equal(StatusCodes.Status403Forbidden, problemResult.ProblemDetails.Status);
Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.4", problemResult.ProblemDetails.Type);
Assert.NotNull(problemResult.ProblemDetails.Extensions["traceId"]);
}
[Fact]