mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 09:11:10 +00:00
Removes the redundant contract and enumeration tests
This commit is contained in:
1 parent
4dce426b38
commit
dc2692e208
127 files changed
-6721
No files matched your search
-35
@@ -1,8 +1,6 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.Fixtures.Core.Requests.Authorization;
|
||||
using Lumina.Contracts.Requests.Authorization;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.Json;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.UnitTests.Requests.Authorization;
|
||||
@@ -13,24 +11,6 @@ namespace Lumina.Contracts.UnitTests.Requests.Authorization;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetUserRoleRequestTests
|
||||
{
|
||||
private readonly GetUserRoleRequestFixture _getUserRoleRequestFixture = new();
|
||||
|
||||
private readonly JsonSerializerOptions _jsonOptions = new()
|
||||
{
|
||||
PropertyNameCaseInsensitive = true
|
||||
};
|
||||
|
||||
[Fact]
|
||||
public void Create_WhenCalled_ShouldReturnValidGetUserRoleRequest()
|
||||
{
|
||||
// Act
|
||||
GetUserRoleRequest sut = _getUserRoleRequestFixture.Create();
|
||||
|
||||
// Assert
|
||||
Assert.NotNull(sut);
|
||||
Assert.True(sut.UserId.HasValue);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Constructor_WhenPassingNullUserId_ShouldReturnNullUserId()
|
||||
{
|
||||
@@ -40,19 +20,4 @@ public class GetUserRoleRequestTests
|
||||
// Assert
|
||||
Assert.Null(sut.UserId);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RoundTrip_WhenSerializingGetUserRoleRequest_ShouldPreserveValues()
|
||||
{
|
||||
// Arrange
|
||||
GetUserRoleRequest expected = _getUserRoleRequestFixture.Create();
|
||||
|
||||
// Act
|
||||
string json = JsonSerializer.Serialize(expected, _jsonOptions);
|
||||
GetUserRoleRequest? actual = JsonSerializer.Deserialize<GetUserRoleRequest>(json, _jsonOptions);
|
||||
|
||||
// Assert
|
||||
Assert.NotNull(actual);
|
||||
Assert.Equal(expected, actual);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user