mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 00:11:10 +00:00
eliminates region sections
This commit is contained in:
1 parent
705c02b90d
commit
405fc1ff9a
370 files changed
+47
-1618
No files matched your search
-2
@@ -11,7 +11,6 @@ namespace Lumina.DataAccess.IntegrationTests.Core.Repositories.Common.Factory;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class RepositoryFactoryTests
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void RepositoryFactoryImplementsRepositoryFactoryInterface_InterfaceIsImplemented_ReturnsTrue()
|
||||
{
|
||||
@@ -21,5 +20,4 @@ public class RepositoryFactoryTests
|
||||
// Assert
|
||||
Assert.True(repositoryFactory is IRepositoryFactory);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -15,7 +15,6 @@ namespace Lumina.DataAccess.IntegrationTests.Core.UoW;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class UnitOfWorkTests
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void UnitOfWorkImplementsUnitOfWorkInterface_InterfaceIsImplemented_ReturnsTrue()
|
||||
{
|
||||
@@ -28,5 +27,4 @@ public class UnitOfWorkTests
|
||||
// Assert
|
||||
Assert.True(unitOfWork is IUnitOfWork);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -22,7 +22,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Common.Converters;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class BookJsonConverter : JsonConverter<Book>
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Reads and converts JSON to a <see cref="Book"/> object.
|
||||
/// </summary>
|
||||
@@ -281,5 +280,4 @@ public class BookJsonConverter : JsonConverter<Book>
|
||||
).Value)
|
||||
.ToList();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -12,7 +12,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Common.Setup;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public static class BogusExtensions
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Adds <see cref="DateOnly"/> random data generation support to the <see cref="Faker"/> class.
|
||||
/// </summary>
|
||||
@@ -36,5 +35,4 @@ public static class BogusExtensions
|
||||
DateTime endDateTime = end.ToDateTime(TimeOnly.MinValue);
|
||||
return System.DateOnly.FromDateTime(faker.Date.Between(startDateTime, endDateTime));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -12,7 +12,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Common.Setup;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class DateOnlySpecimenBuilder : ISpecimenBuilder
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Adds <see cref="DateOnly"/> support to the AutoFixture library.
|
||||
/// </summary>
|
||||
@@ -25,5 +24,4 @@ public class DateOnlySpecimenBuilder : ISpecimenBuilder
|
||||
return DateOnly.FromDateTime(DateTime.Now);
|
||||
return new NoSpecimen();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -20,11 +20,8 @@ namespace Lumina.Presentation.Api.IntegrationTests.Common.Setup;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class LuminaApiFactory : WebApplicationFactory<Program>, IDisposable
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly SqliteConnection _connection;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LuminaApiFactory"/> class.
|
||||
/// </summary>
|
||||
@@ -33,9 +30,7 @@ public class LuminaApiFactory : WebApplicationFactory<Program>, IDisposable
|
||||
_connection = new SqliteConnection("DataSource=:memory:");
|
||||
_connection.Open();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Configures the web host for the integration tests.
|
||||
/// </summary>
|
||||
@@ -69,5 +64,4 @@ public class LuminaApiFactory : WebApplicationFactory<Program>, IDisposable
|
||||
_connection.Close();
|
||||
base.Dispose();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -12,7 +12,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Common.Setup;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class NullableDateOnlySpecimenBuilder : ISpecimenBuilder
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Adds <see cref="DateOnly?"/> support to the AutoFixture library.
|
||||
/// </summary>
|
||||
@@ -25,5 +24,4 @@ public class NullableDateOnlySpecimenBuilder : ISpecimenBuilder
|
||||
return (DateOnly?)DateOnly.FromDateTime(DateTime.Now);
|
||||
return new NoSpecimen();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -26,7 +26,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.FileManageme
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class DirectoriesControllerTests : IClassFixture<LuminaApiFactory>
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly HttpClient _client;
|
||||
private readonly JsonSerializerOptions _jsonOptions = new()
|
||||
{
|
||||
@@ -35,9 +34,7 @@ public class DirectoriesControllerTests : IClassFixture<LuminaApiFactory>
|
||||
Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) }
|
||||
};
|
||||
private static readonly bool s_isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DirectoriesControllerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -46,9 +43,7 @@ public class DirectoriesControllerTests : IClassFixture<LuminaApiFactory>
|
||||
{
|
||||
_client = apiFactory.CreateClient();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task GetDirectoryTree_WhenCalledWithValidPathAndIncludeFilesAndNotIncludeHiddenElements_ShouldReturnDirectoryTreeWithFilesAndNotHiddenElements()
|
||||
{
|
||||
@@ -641,5 +636,4 @@ public class DirectoriesControllerTests : IClassFixture<LuminaApiFactory>
|
||||
fileSystemFixture.CleanupFileSystemStructure();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -24,7 +24,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.FileManageme
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class DrivesControllerTests : IClassFixture<LuminaApiFactory>
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly HttpClient _client;
|
||||
private readonly JsonSerializerOptions _jsonOptions = new()
|
||||
{
|
||||
@@ -33,9 +32,7 @@ public class DrivesControllerTests : IClassFixture<LuminaApiFactory>
|
||||
Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) }
|
||||
};
|
||||
private static readonly bool s_isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DrivesControllerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -44,9 +41,7 @@ public class DrivesControllerTests : IClassFixture<LuminaApiFactory>
|
||||
{
|
||||
_client = apiFactory.CreateClient();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
|
||||
[Fact]
|
||||
public async Task GetDrives_WhenCalled_ShouldReturnDrives()
|
||||
@@ -81,5 +76,4 @@ public class DrivesControllerTests : IClassFixture<LuminaApiFactory>
|
||||
firstDrive.ItemType.Should().Be(FileSystemItemType.Root);
|
||||
drives.Count.Should().BeGreaterThanOrEqualTo(1);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -25,7 +25,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.FileManageme
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class FileSystemControllerTests : IClassFixture<LuminaApiFactory>
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly HttpClient _client;
|
||||
private readonly JsonSerializerOptions _jsonOptions = new()
|
||||
{
|
||||
@@ -33,9 +32,7 @@ public class FileSystemControllerTests : IClassFixture<LuminaApiFactory>
|
||||
PropertyNameCaseInsensitive = true,
|
||||
Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) }
|
||||
};
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FileSystemControllerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -44,9 +41,7 @@ public class FileSystemControllerTests : IClassFixture<LuminaApiFactory>
|
||||
{
|
||||
_client = apiFactory.CreateClient();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task GetType_WhenCalled_ShouldReturnOkResultWithFileSystemTypeResponse()
|
||||
{
|
||||
@@ -95,5 +90,4 @@ public class FileSystemControllerTests : IClassFixture<LuminaApiFactory>
|
||||
// Assert
|
||||
await act.Should().NotThrowAsync();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -25,7 +25,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.FileManageme
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class FilesControllerTests : IClassFixture<LuminaApiFactory>
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly HttpClient _client;
|
||||
private readonly JsonSerializerOptions _jsonOptions = new()
|
||||
{
|
||||
@@ -34,9 +33,7 @@ public class FilesControllerTests : IClassFixture<LuminaApiFactory>
|
||||
Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) }
|
||||
};
|
||||
private static readonly bool s_isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FilesControllerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -45,9 +42,7 @@ public class FilesControllerTests : IClassFixture<LuminaApiFactory>
|
||||
{
|
||||
_client = apiFactory.CreateClient();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task GetTreeFiles_WhenCalledWithValidPathAndNotIncludeHiddenElements_ShouldReturnTreeFilesWithoutHiddenElements()
|
||||
{
|
||||
@@ -331,5 +326,4 @@ public class FilesControllerTests : IClassFixture<LuminaApiFactory>
|
||||
fileSystemFixture.CleanupFileSystemStructure();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -13,12 +13,9 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.FileManageme
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class FileSystemStructureFixture
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly string _rootPath;
|
||||
private readonly Faker _faker = new();
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FileSystemStructureFixture"/> class.
|
||||
/// </summary>
|
||||
@@ -26,9 +23,7 @@ public class FileSystemStructureFixture
|
||||
{
|
||||
_rootPath = Path.Combine(AppContext.BaseDirectory, "TestFileSystemStructure_" + Guid.NewGuid());
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
|
||||
/// <summary>
|
||||
/// Creates a file system structure with three nested directories, each containing two text files.
|
||||
@@ -93,5 +88,4 @@ public class FileSystemStructureFixture
|
||||
if (Directory.Exists(_rootPath))
|
||||
Directory.Delete(_rootPath, recursive: true);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-4
@@ -15,11 +15,8 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.FileManageme
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class FileSystemTreeNodeResponseFixture
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly Faker _faker = new();
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a single <see cref="FileSystemTreeNodeResponse"/> with a nested structure.
|
||||
/// </summary>
|
||||
@@ -58,5 +55,4 @@ public class FileSystemTreeNodeResponseFixture
|
||||
{
|
||||
return Enumerable.Range(0, count).Select(_ => Create(0, maxDepth, maxChildren)).ToList();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -15,14 +15,11 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.FileManageme
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class TestImageFixture : IDisposable
|
||||
{
|
||||
#region ==================================================================== PROPERTIES =================================================================================
|
||||
/// <summary>
|
||||
/// Gets the path of the created test image.
|
||||
/// </summary>
|
||||
public string ImagePath { get; }
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TestImageFixture"/> class.
|
||||
/// </summary>
|
||||
@@ -31,9 +28,7 @@ public class TestImageFixture : IDisposable
|
||||
ImagePath = Path.Combine(Path.GetTempPath(), $"TestImage_{Guid.NewGuid()}.jpg");
|
||||
CreateTestImage();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a test image file.
|
||||
/// </summary>
|
||||
@@ -51,5 +46,4 @@ public class TestImageFixture : IDisposable
|
||||
if (File.Exists(ImagePath))
|
||||
File.Delete(ImagePath);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -26,7 +26,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.FileManageme
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class PathControllerTests : IClassFixture<LuminaApiFactory>
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly HttpClient _client;
|
||||
private readonly JsonSerializerOptions _jsonOptions = new()
|
||||
{
|
||||
@@ -35,9 +34,7 @@ public class PathControllerTests : IClassFixture<LuminaApiFactory>
|
||||
Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) }
|
||||
};
|
||||
private static readonly bool s_isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PathControllerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -46,9 +43,7 @@ public class PathControllerTests : IClassFixture<LuminaApiFactory>
|
||||
{
|
||||
_client = apiFactory.CreateClient();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task GetPathRoot_WhenCalledWithValidPath_ShouldReturnOkResultWithPathSegmentResponse()
|
||||
{
|
||||
@@ -636,5 +631,4 @@ public class PathControllerTests : IClassFixture<LuminaApiFactory>
|
||||
// Assert
|
||||
await act.Should().ThrowAsync<TaskCanceledException>();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -21,7 +21,6 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.FileManageme
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class ThumbnailsControllerTests : IClassFixture<LuminaApiFactory>, IClassFixture<TestImageFixture>
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly HttpClient _client;
|
||||
private readonly JsonSerializerOptions _jsonOptions = new()
|
||||
{
|
||||
@@ -30,9 +29,7 @@ public class ThumbnailsControllerTests : IClassFixture<LuminaApiFactory>, IClass
|
||||
Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) }
|
||||
};
|
||||
private readonly string _testImagePath;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ThumbnailsControllerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -43,9 +40,7 @@ public class ThumbnailsControllerTests : IClassFixture<LuminaApiFactory>, IClass
|
||||
_client = apiFactory.CreateClient();
|
||||
_testImagePath = imageFixture.ImagePath;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task GetThumbnail_WhenCalledWithValidPathAndQuality_ShouldReturnOkResultWithThumbnail()
|
||||
{
|
||||
@@ -132,5 +127,4 @@ public class ThumbnailsControllerTests : IClassFixture<LuminaApiFactory>, IClass
|
||||
// Assert
|
||||
await act.Should().ThrowAsync<TaskCanceledException>();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -28,14 +28,11 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.WrittenConte
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class BooksControllerTests : IClassFixture<LuminaApiFactory>
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly LuminaApiFactory _apiFactory;
|
||||
private readonly HttpClient _client;
|
||||
private readonly AddBookRequestFixture _requestBookFixture;
|
||||
private readonly JsonSerializerOptions _jsonOptions = new();
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BooksControllerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -47,9 +44,7 @@ public class BooksControllerTests : IClassFixture<LuminaApiFactory>
|
||||
_requestBookFixture = new AddBookRequestFixture();
|
||||
_jsonOptions.Converters.Add(new BookJsonConverter());
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task GetBooks_WhenCalled_ShouldReturnBooks()
|
||||
{
|
||||
@@ -1615,5 +1610,4 @@ public class BooksControllerTests : IClassFixture<LuminaApiFactory>
|
||||
response.StatusCode.Should().Be(HttpStatusCode.Created);
|
||||
bookResponse.Should().NotBeNull();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -22,13 +22,10 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.Books.Fixtur
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class AddBookRequestFixture
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly Fixture _fixture;
|
||||
private readonly Random _random = new();
|
||||
private readonly Faker _faker;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AddBookRequestFixture"/> class.
|
||||
/// </summary>
|
||||
@@ -39,9 +36,7 @@ public class AddBookRequestFixture
|
||||
_fixture.Customizations.Add(new NullableDateOnlySpecimenBuilder());
|
||||
_faker = new Faker();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid request to add a book.
|
||||
/// </summary>
|
||||
@@ -345,5 +340,4 @@ public class AddBookRequestFixture
|
||||
{
|
||||
return input?.Length > maxLength ? input[..maxLength] : input;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -21,11 +21,8 @@ namespace Lumina.Presentation.Api.IntegrationTests.Core.Controllers.Books.Fixtur
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class DomainBookFixture
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly Fixture _fixture;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DomainBookFixture"/> class.
|
||||
/// </summary>
|
||||
@@ -36,9 +33,7 @@ public class DomainBookFixture
|
||||
_fixture.Customizations.Add(new NullableDateOnlySpecimenBuilder());
|
||||
ConfigureCustomDomainTypes();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
public Book CreateDomainBook()
|
||||
{
|
||||
return Book.Create(
|
||||
@@ -109,5 +104,4 @@ public class DomainBookFixture
|
||||
_fixture.Create<Optional<int>>()
|
||||
).Value);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -21,12 +21,9 @@ namespace Lumina.Application.UnitTests.Common.Behaviors;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class ValidationBehaviorTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IValidator<ValidationBehaviorFixture> _mockValidator;
|
||||
private readonly MessageHandlerDelegate<ValidationBehaviorFixture, ErrorOr<ValidationBehaviorTestResponse>> _nextDelegate;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ValidationBehaviorTests"/> class.
|
||||
/// </summary>
|
||||
@@ -35,9 +32,7 @@ public class ValidationBehaviorTests
|
||||
_mockValidator = Substitute.For<IValidator<ValidationBehaviorFixture>>();
|
||||
_nextDelegate = Substitute.For<MessageHandlerDelegate<ValidationBehaviorFixture, ErrorOr<ValidationBehaviorTestResponse>>>();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task Handle_WhenValidatorIsNull_ShouldInvokeNextDelegate()
|
||||
{
|
||||
@@ -102,5 +97,4 @@ public class ValidationBehaviorTests
|
||||
await _mockValidator.Received(1).ValidateAsync(request, Arg.Any<CancellationToken>());
|
||||
await _nextDelegate.DidNotReceive().Invoke(request, Arg.Any<CancellationToken>());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -18,11 +18,8 @@ namespace Lumina.Application.UnitTests.Common.Converters;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class OptionalJsonConverterFactoryTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly OptionalJsonConverterFactory _factory;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OptionalJsonConverterFactoryTests"/> class.
|
||||
/// </summary>
|
||||
@@ -30,9 +27,7 @@ public class OptionalJsonConverterFactoryTests
|
||||
{
|
||||
_factory = new OptionalJsonConverterFactory();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void CanConvert_WhenTypeIsOptional_ShouldReturnTrue()
|
||||
{
|
||||
@@ -113,5 +108,4 @@ public class OptionalJsonConverterFactoryTests
|
||||
// Assert
|
||||
converter.Should().BeOfType<OptionalJsonConverter<OptionalJsonConverterFactoryFixture>>();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Common.Converters;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class OptionalJsonConverterTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly JsonSerializerOptions _options;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OptionalJsonConverterTests"/> class.
|
||||
/// </summary>
|
||||
@@ -28,9 +25,7 @@ public class OptionalJsonConverterTests
|
||||
_options.Converters.Add(new OptionalJsonConverter<string>());
|
||||
_options.Converters.Add(new OptionalJsonConverter<int>());
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Read_WhenJsonIsNull_ShouldReturnNone()
|
||||
{
|
||||
@@ -138,5 +133,4 @@ public class OptionalJsonConverterTests
|
||||
// Assert
|
||||
deserialized.Should().Be(original);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -20,13 +20,10 @@ namespace Lumina.Application.UnitTests.Common.Mapping.FileManagement;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class DirectoryMappingConfigTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly TypeAdapterConfig _config;
|
||||
private readonly DirectoryMappingConfig _directoryMappingConfig;
|
||||
private readonly FileSystemTreeMappingConfig _fileSystemTreeMappingConfig;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
public DirectoryMappingConfigTests()
|
||||
{
|
||||
_config = new TypeAdapterConfig();
|
||||
@@ -35,9 +32,7 @@ public class DirectoryMappingConfigTests
|
||||
_directoryMappingConfig.Register(_config);
|
||||
_fileSystemTreeMappingConfig.Register(_config);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Register_WhenMappingDirectoryToFileSystemTreeNodeResponse_ShouldMapCorrectly()
|
||||
{
|
||||
@@ -115,5 +110,4 @@ public class DirectoryMappingConfigTests
|
||||
result.DateCreated.Should().BeOnOrAfter(beforeMapping).And.BeOnOrBefore(afterMapping);
|
||||
result.DateModified.Should().BeOnOrAfter(beforeMapping).And.BeOnOrBefore(afterMapping);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -16,13 +16,10 @@ namespace Lumina.Application.UnitTests.Common.Mapping.FileManagement;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class FileMappingConfigTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly TypeAdapterConfig _config;
|
||||
private readonly FileMappingConfig _fileMappingConfig;
|
||||
private readonly FileSystemTreeMappingConfig _fileSystemTreeMappingConfig;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
public FileMappingConfigTests()
|
||||
{
|
||||
_config = new TypeAdapterConfig();
|
||||
@@ -31,9 +28,7 @@ public class FileMappingConfigTests
|
||||
_fileMappingConfig.Register(_config);
|
||||
_fileSystemTreeMappingConfig.Register(_config);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Register_WhenMappingFileToFileSystemTreeNodeResponse_ShouldMapCorrectly()
|
||||
{
|
||||
@@ -91,5 +86,4 @@ public class FileMappingConfigTests
|
||||
result.DateModified.Should().Be(default);
|
||||
result.Size.Should().Be(file.Size);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -18,21 +18,16 @@ namespace Lumina.Application.UnitTests.Common.Mapping.FileManagement;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class FileSystemTreeMappingConfigTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly TypeAdapterConfig _config;
|
||||
private readonly FileSystemTreeMappingConfig _fileSystemTreeMappingConfig;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
public FileSystemTreeMappingConfigTests()
|
||||
{
|
||||
_config = new TypeAdapterConfig();
|
||||
_fileSystemTreeMappingConfig = new FileSystemTreeMappingConfig();
|
||||
_fileSystemTreeMappingConfig.Register(_config);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Register_WhenMappingWindowsRootItemToFileSystemTreeNodeResponse_ShouldMapCorrectly()
|
||||
{
|
||||
@@ -160,5 +155,4 @@ public class FileSystemTreeMappingConfigTests
|
||||
result.ChildrenLoaded.Should().BeFalse();
|
||||
result.Children.Should().BeEmpty();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -17,21 +17,16 @@ namespace Lumina.Application.UnitTests.Common.Mapping.FileManagement;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class PathSegmentMappingConfigTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly TypeAdapterConfig _config;
|
||||
private readonly PathSegmentMappingConfig _pathSegmentMappingConfig;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
public PathSegmentMappingConfigTests()
|
||||
{
|
||||
_config = new TypeAdapterConfig();
|
||||
_pathSegmentMappingConfig = new PathSegmentMappingConfig();
|
||||
_pathSegmentMappingConfig.Register(_config);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Register_WhenMappingPathSegmentToPathSegmentResponse_ShouldMapCorrectly()
|
||||
{
|
||||
@@ -90,5 +85,4 @@ public class PathSegmentMappingConfigTests
|
||||
results[i].Path.Should().Be(pathSegments[i].Name);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -18,13 +18,10 @@ namespace Lumina.Application.UnitTests.Common.Mapping.FileManagement;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class ThumbnailMappingConfigTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly TypeAdapterConfig _config;
|
||||
private readonly ThumbnailMappingConfig _thumbnailMappingConfig;
|
||||
private readonly Faker _faker;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
public ThumbnailMappingConfigTests()
|
||||
{
|
||||
_config = new TypeAdapterConfig();
|
||||
@@ -32,9 +29,7 @@ public class ThumbnailMappingConfigTests
|
||||
_thumbnailMappingConfig.Register(_config);
|
||||
_faker = new Faker();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Register_WhenMappingThumbnailToThumbnailResponse_ShouldMapCorrectly()
|
||||
{
|
||||
@@ -111,5 +106,4 @@ public class ThumbnailMappingConfigTests
|
||||
results[i].Bytes.Should().BeEquivalentTo(thumbnails[i].Bytes);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Common.Setup;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public static class BogusExtensions
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Adds <see cref="DateOnly"/> random data generation support to the <see cref="Faker"/> class.
|
||||
/// </summary>
|
||||
@@ -36,5 +35,4 @@ public static class BogusExtensions
|
||||
DateTime endDateTime = end.ToDateTime(TimeOnly.MinValue);
|
||||
return System.DateOnly.FromDateTime(faker.Date.Between(startDateTime, endDateTime));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Common.Setup;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class DateOnlySpecimenBuilder : ISpecimenBuilder
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Adds <see cref="DateOnly"/> support to the AutoFixture library.
|
||||
/// </summary>
|
||||
@@ -25,5 +24,4 @@ public class DateOnlySpecimenBuilder : ISpecimenBuilder
|
||||
return DateOnly.FromDateTime(DateTime.Now);
|
||||
return new NoSpecimen();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Common.Setup;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class NullableDateOnlySpecimenBuilder : ISpecimenBuilder
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Adds <see cref="DateOnly?"/> support to the AutoFixture library.
|
||||
/// </summary>
|
||||
@@ -25,5 +24,4 @@ public class NullableDateOnlySpecimenBuilder : ISpecimenBuilder
|
||||
return (DateOnly?)DateOnly.FromDateTime(DateTime.Now);
|
||||
return new NoSpecimen();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -19,11 +19,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Fixtures;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class DirectoryFixture
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly Faker _faker;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DirectoryFixture"/> class.
|
||||
/// </summary>
|
||||
@@ -31,9 +28,7 @@ public class DirectoryFixture
|
||||
{
|
||||
_faker = new Faker();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="Directory"/>.
|
||||
/// </summary>
|
||||
@@ -112,5 +107,4 @@ public class DirectoryFixture
|
||||
}
|
||||
return CreateDirectory(childItems: childItems);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-4
@@ -14,12 +14,9 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Fixtures;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class DirectoryResponseFixture
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly Faker _faker = new();
|
||||
private readonly FileSystemItemModelFixture _fileSystemItemModelFixture = new();
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="DirectoryResponse"/>.
|
||||
/// </summary>
|
||||
@@ -46,5 +43,4 @@ public class DirectoryResponseFixture
|
||||
{
|
||||
return Enumerable.Range(0, count).Select(_ => Create(itemCount)).ToList();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-4
@@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Fixtures;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class FileSystemItemModelFixture
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly Faker _faker = new();
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="FileSystemItemModel"/>.
|
||||
/// </summary>
|
||||
@@ -42,5 +39,4 @@ public class FileSystemItemModelFixture
|
||||
{
|
||||
return Enumerable.Range(0, count).Select(_ => Create()).ToList();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-4
@@ -15,11 +15,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Fixtures;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class FileSystemTreeNodeResponseFixture
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly Faker _faker = new();
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a single <see cref="FileSystemTreeNodeResponse"/> with a nested structure.
|
||||
/// </summary>
|
||||
@@ -58,5 +55,4 @@ public class FileSystemTreeNodeResponseFixture
|
||||
{
|
||||
return Enumerable.Range(0, count).Select(_ => Create(0, maxDepth, maxChildren)).ToList();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Queries.G
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetDirectoriesQueryFixture
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid query to get directories.
|
||||
/// </summary>
|
||||
@@ -28,5 +27,4 @@ public class GetDirectoriesQueryFixture
|
||||
.RuleFor(x => x.Path, f => f.System.DirectoryPath())
|
||||
.RuleFor(x => x.IncludeHiddenElements, f => includeHiddenElements);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -27,16 +27,13 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Queries.G
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetDirectoriesQueryHandlerTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IFixture _fixture;
|
||||
private readonly IMapper _mockMapper;
|
||||
private readonly IDirectoryService _mockDirectoryService;
|
||||
private readonly GetDirectoriesQueryHandler _sut;
|
||||
private readonly DirectoryFixture _directoryFixture;
|
||||
private readonly DirectoryResponseFixture _directoryResponseFixture;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetDirectoriesQueryHandlerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -49,9 +46,7 @@ public class GetDirectoriesQueryHandlerTests
|
||||
_directoryFixture = new DirectoryFixture();
|
||||
_directoryResponseFixture = new DirectoryResponseFixture();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task Handle_WhenCalledWithValidQueryWithoutFilesIncluded_ShouldReturnSuccessResult()
|
||||
{
|
||||
@@ -139,5 +134,4 @@ public class GetDirectoriesQueryHandlerTests
|
||||
result.Value.Should().BeEmpty();
|
||||
_mockDirectoryService.Received(1).GetSubdirectories(query.Path, query.IncludeHiddenElements);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Queries.G
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetDirectoriesQueryValidatorTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly GetDirectoriesQueryValidator _validator;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetDirectoriesQueryValidatorTests"/> class.
|
||||
/// </summary>
|
||||
@@ -26,9 +23,7 @@ public class GetDirectoriesQueryValidatorTests
|
||||
{
|
||||
_validator = new GetDirectoriesQueryValidator();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
|
||||
{
|
||||
@@ -115,5 +110,4 @@ public class GetDirectoriesQueryValidatorTests
|
||||
// Assert
|
||||
result.ShouldNotHaveValidationErrorFor(x => x.IncludeHiddenElements);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Queries.G
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetDirectoryTreeQueryFixture
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid query to get directory tree.
|
||||
/// </summary>
|
||||
@@ -31,5 +30,4 @@ public class GetDirectoryTreeQueryFixture
|
||||
.RuleFor(x => x.IncludeFiles, f => includeFiles)
|
||||
.RuleFor(x => x.IncludeHiddenElements, f => includeHiddenElements);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -29,7 +29,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Queries.G
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetDirectoryTreeQueryHandlerTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IFixture _fixture;
|
||||
private readonly IDriveService _mockDriveService;
|
||||
private readonly IDirectoryService _mockDirectoryService;
|
||||
@@ -40,9 +39,7 @@ public class GetDirectoryTreeQueryHandlerTests
|
||||
private readonly DirectoryFixture _directoryFixture;
|
||||
private readonly PathSegmentFixture _pathSegmentFixture;
|
||||
private readonly FileFixture _fileFixture;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetDirectoryTreeQueryHandlerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -59,9 +56,7 @@ public class GetDirectoryTreeQueryHandlerTests
|
||||
_pathSegmentFixture = new PathSegmentFixture();
|
||||
_fileFixture = new FileFixture();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task Handle_WhenCalledWithValidQueryAndNoIncludeFiles_ShouldReturnSuccessResult()
|
||||
{
|
||||
@@ -391,5 +386,4 @@ public class GetDirectoryTreeQueryHandlerTests
|
||||
result.Value.First().Children.Should().HaveCount(2);
|
||||
_mockDirectoryService.Received(1).GetSubdirectories(Arg.Any<string>(), false);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Queries.G
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetDirectoryTreeQueryValidatorTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly GetDirectoryTreeQueryValidator _validator;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetDirectoryTreeQueryValidatorTests"/> class.
|
||||
/// </summary>
|
||||
@@ -26,9 +23,7 @@ public class GetDirectoryTreeQueryValidatorTests
|
||||
{
|
||||
_validator = new GetDirectoryTreeQueryValidator();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
|
||||
{
|
||||
@@ -143,5 +138,4 @@ public class GetDirectoryTreeQueryValidatorTests
|
||||
// Assert
|
||||
result.ShouldNotHaveValidationErrorFor(x => x.IncludeFiles);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Queries.G
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetTreeDirectoriesQueryFixture
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid query to get tree directories.
|
||||
/// </summary>
|
||||
@@ -28,5 +27,4 @@ public class GetTreeDirectoriesQueryFixture
|
||||
.RuleFor(x => x.Path, f => f.System.DirectoryPath())
|
||||
.RuleFor(x => x.IncludeHiddenElements, f => includeHiddenElements);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -32,7 +32,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Queries.G
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetTreeDirectoriesQueryHandlerTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IFixture _fixture;
|
||||
private readonly IMapper _mockMapper;
|
||||
private readonly IDirectoryService _mockDirectoryService;
|
||||
@@ -40,9 +39,7 @@ public class GetTreeDirectoriesQueryHandlerTests
|
||||
private readonly GetTreeDirectoriesQueryFixture _getTreeDirectoriesQueryFixture;
|
||||
private readonly DirectoryFixture _directoryFixture;
|
||||
private readonly FileSystemTreeNodeResponseFixture _fileSystemTreeNodeResponseFixture;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetTreeDirectoriesQueryHandlerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -56,9 +53,7 @@ public class GetTreeDirectoriesQueryHandlerTests
|
||||
_directoryFixture = new DirectoryFixture();
|
||||
_fileSystemTreeNodeResponseFixture = new FileSystemTreeNodeResponseFixture();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task Handle_WhenCalledWithValidQueryWithoutFilesIncluded_ShouldReturnSuccessResult()
|
||||
{
|
||||
@@ -170,5 +165,4 @@ public class GetTreeDirectoriesQueryHandlerTests
|
||||
result.Value.Should().BeEquivalentTo(nestedResponses, options => options.IncludingNestedObjects());
|
||||
result.Value.Any(r => r.Children.Count != 0).Should().BeTrue();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Directories.Queries.G
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetTreeDirectoriesQueryValidatorTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly GetTreeDirectoriesQueryValidator _validator;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetTreeDirectoriesQueryValidatorTests"/> class.
|
||||
/// </summary>
|
||||
@@ -26,9 +23,7 @@ public class GetTreeDirectoriesQueryValidatorTests
|
||||
{
|
||||
_validator = new GetTreeDirectoriesQueryValidator();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
|
||||
{
|
||||
@@ -115,5 +110,4 @@ public class GetTreeDirectoriesQueryValidatorTests
|
||||
// Assert
|
||||
result.ShouldNotHaveValidationErrorFor(x => x.IncludeHiddenElements);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-4
@@ -15,11 +15,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Drives.Queries.GetDri
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetDrivesQueryFixture
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly Faker _faker = new();
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a single <see cref="FileSystemTreeNodeResponse"/> with a nested structure.
|
||||
/// </summary>
|
||||
@@ -58,5 +55,4 @@ public class GetDrivesQueryFixture
|
||||
{
|
||||
return Enumerable.Range(0, count).Select(_ => Create(0, maxDepth, maxChildren)).ToList();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -26,15 +26,12 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Drives.Queries.GetDri
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetDrivesQueryHandlerTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IFixture _fixture;
|
||||
private readonly IMapper _mockMapper;
|
||||
private readonly IDriveService _mockDriveService;
|
||||
private readonly GetDrivesQueryHandler _sut;
|
||||
private readonly GetDrivesQueryFixture _getDrivesQueryFixture;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetDrivesQueryHandlerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -46,9 +43,7 @@ public class GetDrivesQueryHandlerTests
|
||||
_sut = new GetDrivesQueryHandler(_mockDriveService, _mockMapper);
|
||||
_getDrivesQueryFixture = new GetDrivesQueryFixture();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task Handle_WhenCalled_ShouldReturnSuccessResult()
|
||||
{
|
||||
@@ -119,5 +114,4 @@ public class GetDrivesQueryHandlerTests
|
||||
_mockDriveService.Received(1).GetDrives();
|
||||
_mockMapper.Received(1).Map<IEnumerable<FileSystemTreeNodeResponse>>(Arg.Any<IEnumerable<FileSystemItem>>());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -21,14 +21,11 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.FileSystem.Queries.Ge
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetFileSystemQueryHandlerTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IFixture _fixture;
|
||||
private readonly IPlatformContextManager _mockPlatformContextManager;
|
||||
private readonly IPlatformContext _mockPlatformContext;
|
||||
private readonly GetFileSystemQueryHandler _sut;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetFileSystemQueryHandlerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -40,9 +37,7 @@ public class GetFileSystemQueryHandlerTests
|
||||
_mockPlatformContextManager.GetCurrentContext().Returns(_mockPlatformContext);
|
||||
_sut = new GetFileSystemQueryHandler(_mockPlatformContextManager);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Theory]
|
||||
[InlineData(PlatformType.Unix)]
|
||||
[InlineData(PlatformType.Windows)]
|
||||
@@ -110,5 +105,4 @@ public class GetFileSystemQueryHandlerTests
|
||||
await act.Should().NotThrowAsync();
|
||||
_mockPlatformContextManager.Received(1).GetCurrentContext();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -18,11 +18,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Files.Fixtures;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class FileFixture
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly Faker _faker;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FileFixture"/> class.
|
||||
/// </summary>
|
||||
@@ -30,9 +27,7 @@ public class FileFixture
|
||||
{
|
||||
_faker = new Faker();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="File"/>.
|
||||
/// </summary>
|
||||
@@ -84,5 +79,4 @@ public class FileFixture
|
||||
FileSystemItemStatus.Accessible
|
||||
).Value;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-4
@@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Files.Fixtures;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class FileResponseFixture
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly Faker _faker = new();
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="FileResponse"/>.
|
||||
/// </summary>
|
||||
@@ -43,5 +40,4 @@ public class FileResponseFixture
|
||||
{
|
||||
return Enumerable.Range(0, count).Select(_ => Create()).ToList();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Files.Queries.GetFile
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetFilesQueryFixture
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid query to get files.
|
||||
/// </summary>
|
||||
@@ -28,5 +27,4 @@ public class GetFilesQueryFixture
|
||||
.RuleFor(x => x.Path, f => f.System.FilePath())
|
||||
.RuleFor(x => x.IncludeHiddenElements, f => includeHiddenElements);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -28,16 +28,13 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Files.Queries.GetFile
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetFilesQueryHandlerTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IFixture _fixture;
|
||||
private readonly IMapper _mockMapper;
|
||||
private readonly IFileService _mockFileService;
|
||||
private readonly GetFilesQueryHandler _sut;
|
||||
private readonly FileFixture _fileFixture;
|
||||
private readonly FileResponseFixture _fileResponseFixture;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetFilesQueryHandlerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -50,9 +47,7 @@ public class GetFilesQueryHandlerTests
|
||||
_fileFixture = new FileFixture();
|
||||
_fileResponseFixture = new FileResponseFixture();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task Handle_WhenCalledWithValidQueryWithoutHiddenFiles_ShouldReturnSuccessResult()
|
||||
{
|
||||
@@ -145,5 +140,4 @@ public class GetFilesQueryHandlerTests
|
||||
_mockFileService.Received(1).GetFiles(query.Path, query.IncludeHiddenElements);
|
||||
_mockMapper.Received(1).Map<IEnumerable<FileResponse>>(Arg.Is<IEnumerable<File>>(f => !f.Any()));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Files.Queries.GetFile
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetFilesQueryValidatorTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly GetFilesQueryValidator _validator;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetFilesQueryValidatorTests"/> class.
|
||||
/// </summary>
|
||||
@@ -26,9 +23,7 @@ public class GetFilesQueryValidatorTests
|
||||
{
|
||||
_validator = new GetFilesQueryValidator();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
|
||||
{
|
||||
@@ -115,5 +110,4 @@ public class GetFilesQueryValidatorTests
|
||||
// Assert
|
||||
result.ShouldNotHaveValidationErrorFor(x => x.IncludeHiddenElements);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Files.Queries.GetTree
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetTreeFilesQueryFixture
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid query to get files.
|
||||
/// </summary>
|
||||
@@ -28,5 +27,4 @@ public class GetTreeFilesQueryFixture
|
||||
.RuleFor(x => x.Path, f => f.System.FilePath())
|
||||
.RuleFor(x => x.IncludeHiddenElements, f => includeHiddenElements);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -27,16 +27,13 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Files.Queries.GetTree
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetTreeFilesQueryHandlerTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IFixture _fixture;
|
||||
private readonly IMapper _mockMapper;
|
||||
private readonly IFileService _mockFileService;
|
||||
private readonly GetTreeFilesQueryHandler _sut;
|
||||
private readonly FileFixture _fileFixture;
|
||||
private readonly FileSystemTreeNodeResponseFixture _fileSystemTreeNodeResponseFixture;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetTreeFilesQueryHandler"/> class.
|
||||
/// </summary>
|
||||
@@ -49,9 +46,7 @@ public class GetTreeFilesQueryHandlerTests
|
||||
_fileFixture = new FileFixture();
|
||||
_fileSystemTreeNodeResponseFixture = new FileSystemTreeNodeResponseFixture();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task Handle_WhenCalledWithValidQueryWithoutHiddenFiles_ShouldReturnSuccessResult()
|
||||
{
|
||||
@@ -139,5 +134,4 @@ public class GetTreeFilesQueryHandlerTests
|
||||
result.Value.Should().BeEmpty();
|
||||
_mockFileService.Received(1).GetFiles(query.Path, query.IncludeHiddenElements);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Files.Queries.GetTree
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetTreeFilesQueryValidatorTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly GetTreeFilesQueryValidator _validator;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetTreeFilesQueryValidatorTests"/> class.
|
||||
/// </summary>
|
||||
@@ -26,9 +23,7 @@ public class GetTreeFilesQueryValidatorTests
|
||||
{
|
||||
_validator = new GetTreeFilesQueryValidator();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
|
||||
{
|
||||
@@ -115,5 +110,4 @@ public class GetTreeFilesQueryValidatorTests
|
||||
// Assert
|
||||
result.ShouldNotHaveValidationErrorFor(x => x.IncludeHiddenElements);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -21,13 +21,10 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Commands.Combine
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class CombinePathCommandHandlerTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IFixture _fixture;
|
||||
private readonly IPathService _mockPathService;
|
||||
private readonly CombinePathCommandHandler _sut;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CombinePathCommandHandlerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -37,9 +34,7 @@ public class CombinePathCommandHandlerTests
|
||||
_mockPathService = Substitute.For<IPathService>();
|
||||
_sut = new CombinePathCommandHandler(_mockPathService);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task Handle_WhenCalledWithValidCommand_ShouldReturnSuccessResult()
|
||||
{
|
||||
@@ -95,5 +90,4 @@ public class CombinePathCommandHandlerTests
|
||||
result.Value.Path.Should().BeEmpty();
|
||||
_mockPathService.Received(1).CombinePath(command.OriginalPath, command.NewPath);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Commands.Combine
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class CombinePathCommandValidatorTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly CombinePathCommandValidator _validator;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CombinePathCommandValidatorTests"/> class.
|
||||
/// </summary>
|
||||
@@ -26,9 +23,7 @@ public class CombinePathCommandValidatorTests
|
||||
{
|
||||
_validator = new CombinePathCommandValidator();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Validate_WhenOriginalPathIsNull_ShouldHaveValidationError()
|
||||
{
|
||||
@@ -133,5 +128,4 @@ public class CombinePathCommandValidatorTests
|
||||
result.ShouldNotHaveValidationErrorFor(x => x.OriginalPath);
|
||||
result.ShouldNotHaveValidationErrorFor(x => x.NewPath);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Commands.Combine
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class CombinePathCommandFixture
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid command to combine paths.
|
||||
/// </summary>
|
||||
@@ -27,5 +26,4 @@ public class CombinePathCommandFixture
|
||||
.RuleFor(x => x.OriginalPath, f => f.System.FilePath())
|
||||
.RuleFor(x => x.NewPath, f => f.System.FilePath());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Commands.SplitPa
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class SplitPathCommandFixture
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid command for splitting paths.
|
||||
/// </summary>
|
||||
@@ -25,5 +24,4 @@ public class SplitPathCommandFixture
|
||||
))
|
||||
.RuleFor(x => x.Path, f => f.System.FilePath());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -29,7 +29,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Commands.SplitPa
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class SplitPathCommandHandlerTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IFixture _fixture;
|
||||
private readonly IMapper _mockMapper;
|
||||
private readonly IPathService _mockPathService;
|
||||
@@ -38,9 +37,7 @@ public class SplitPathCommandHandlerTests
|
||||
private readonly PathSegmentResponseFixture _pathSegmentResponseFixture;
|
||||
private readonly PathSegmentMappingConfig _pathSegmentMappingConfig;
|
||||
private readonly TypeAdapterConfig _config;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SplitPathCommandHandlerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -57,9 +54,7 @@ public class SplitPathCommandHandlerTests
|
||||
_pathSegmentMappingConfig = new PathSegmentMappingConfig();
|
||||
_pathSegmentMappingConfig.Register(_config);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task Handle_WhenCalledWithValidCommand_ShouldReturnSuccessResult()
|
||||
{
|
||||
@@ -126,5 +121,4 @@ public class SplitPathCommandHandlerTests
|
||||
_mockPathService.Received(1).ParsePath(command.Path);
|
||||
_mockMapper.Received(1).Map<IEnumerable<PathSegmentResponse>>(Arg.Any<IEnumerable<PathSegment>>());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Commands.SplitPa
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class SplitPathCommandValidatorTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly SplitPathCommandValidator _validator;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SplitPathCommandValidatorTests"/> class.
|
||||
/// </summary>
|
||||
@@ -26,9 +23,7 @@ public class SplitPathCommandValidatorTests
|
||||
{
|
||||
_validator = new SplitPathCommandValidator();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
|
||||
{
|
||||
@@ -87,5 +82,4 @@ public class SplitPathCommandValidatorTests
|
||||
// Assert
|
||||
result.ShouldNotHaveValidationErrorFor(x => x.Path);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -16,11 +16,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Fixtures;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class PathSegmentFixture
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly Faker _faker;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PathSegmentFixture"/> class.
|
||||
/// </summary>
|
||||
@@ -28,9 +25,7 @@ public class PathSegmentFixture
|
||||
{
|
||||
_faker = new Faker();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="PathSegment"/>.
|
||||
/// </summary>
|
||||
@@ -60,5 +55,4 @@ public class PathSegmentFixture
|
||||
{
|
||||
return Enumerable.Range(0, count).Select(_ => CreatePathSegment()).ToList();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-4
@@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Fixtures;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class PathSegmentResponseFixture
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly Faker _faker = new();
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="PathSegmentResponse"/>.
|
||||
/// </summary>
|
||||
@@ -37,5 +34,4 @@ public class PathSegmentResponseFixture
|
||||
{
|
||||
return Enumerable.Range(0, count).Select(_ => Create()).ToList();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-4
@@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Fixtures;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class PathSeparatorResponseFixture
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly Faker _faker = new();
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="PathSeparatorResponse"/>.
|
||||
/// </summary>
|
||||
@@ -37,5 +34,4 @@ public class PathSeparatorResponseFixture
|
||||
{
|
||||
return Enumerable.Range(0, count).Select(_ => Create()).ToList();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -18,12 +18,9 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.CheckPat
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class CheckPathExistsQueryHandlerTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IPathService _mockPathService;
|
||||
private readonly CheckPathExistsQueryHandler _sut;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CheckPathExistsQueryHandlerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -32,9 +29,7 @@ public class CheckPathExistsQueryHandlerTests
|
||||
_mockPathService = Substitute.For<IPathService>();
|
||||
_sut = new CheckPathExistsQueryHandler(_mockPathService);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task Handle_WhenPathExistsAndIsNotHidden_ShouldReturnTrueResponse()
|
||||
{
|
||||
@@ -125,5 +120,4 @@ public class CheckPathExistsQueryHandlerTests
|
||||
result.Exists.Should().BeTrue();
|
||||
_mockPathService.Received(1).Exists(query.Path);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.CheckPat
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class CheckPathExistsQueryValidatorTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly CheckPathExistsQueryValidator _validator;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CheckPathExistsQueryValidatorTests"/> class.
|
||||
/// </summary>
|
||||
@@ -26,9 +23,7 @@ public class CheckPathExistsQueryValidatorTests
|
||||
{
|
||||
_validator = new CheckPathExistsQueryValidator();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
|
||||
{
|
||||
@@ -87,5 +82,4 @@ public class CheckPathExistsQueryValidatorTests
|
||||
// Assert
|
||||
result.ShouldNotHaveValidationErrorFor(x => x.Path);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.CheckPat
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class CheckPathExistsQueryFixture
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid query to check if paths exist.
|
||||
/// </summary>
|
||||
@@ -28,5 +27,4 @@ public class CheckPathExistsQueryFixture
|
||||
.RuleFor(x => x.Path, f => f.System.FilePath())
|
||||
.RuleFor(x => x.IncludeHiddenElements, includeHiddenElements);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.GetPathP
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetPathParentQueryFixture
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid query to check if paths exist.
|
||||
/// </summary>
|
||||
@@ -25,5 +24,4 @@ public class GetPathParentQueryFixture
|
||||
))
|
||||
.RuleFor(x => x.Path, f => f.System.FilePath());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -26,16 +26,13 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.GetPathP
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetPathParentQueryHandlerTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IFixture _fixture;
|
||||
private readonly IMapper _mockMapper;
|
||||
private readonly IPathService _mockPathService;
|
||||
private readonly GetPathParentQueryHandler _sut;
|
||||
private readonly PathSegmentFixture _pathSegmentFixture;
|
||||
private readonly PathSegmentResponseFixture _pathSegmentResponseFixture;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
public GetPathParentQueryHandlerTests()
|
||||
{
|
||||
_fixture = new Fixture().Customize(new AutoNSubstituteCustomization());
|
||||
@@ -45,9 +42,7 @@ public class GetPathParentQueryHandlerTests
|
||||
_pathSegmentFixture = new PathSegmentFixture();
|
||||
_pathSegmentResponseFixture = new PathSegmentResponseFixture();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task Handle_WhenCalledWithValidQuery_ShouldReturnSuccessResult()
|
||||
{
|
||||
@@ -114,5 +109,4 @@ public class GetPathParentQueryHandlerTests
|
||||
_mockPathService.Received(1).GoUpOneLevel(query.Path);
|
||||
_mockMapper.Received(1).Map<IEnumerable<PathSegmentResponse>>(Arg.Is<IEnumerable<PathSegment>>(p => !p.Any()));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.GetPathP
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetPathParentQueryValidatorTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly GetPathParentQueryValidator _validator;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetPathParentQueryValidatorTests"/> class.
|
||||
/// </summary>
|
||||
@@ -26,9 +23,7 @@ public class GetPathParentQueryValidatorTests
|
||||
{
|
||||
_validator = new GetPathParentQueryValidator();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
|
||||
{
|
||||
@@ -87,5 +82,4 @@ public class GetPathParentQueryValidatorTests
|
||||
// Assert
|
||||
result.ShouldNotHaveValidationErrorFor(x => x.Path);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.GetPathR
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetPathRootQueryFixture
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid query to check if paths exist.
|
||||
/// </summary>
|
||||
@@ -25,5 +24,4 @@ public class GetPathRootQueryFixture
|
||||
))
|
||||
.RuleFor(x => x.Path, f => f.System.FilePath());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -24,16 +24,13 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.GetPathR
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetPathRootQueryHandlerTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IFixture _fixture;
|
||||
private readonly IMapper _mockMapper;
|
||||
private readonly IPathService _mockPathService;
|
||||
private readonly GetPathRootQueryHandler _sut;
|
||||
private readonly PathSegmentFixture _pathSegmentFixture;
|
||||
private readonly PathSegmentResponseFixture _pathSegmentResponseFixture;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetPathRootQueryHandlerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -46,9 +43,7 @@ public class GetPathRootQueryHandlerTests
|
||||
_pathSegmentFixture = new PathSegmentFixture();
|
||||
_pathSegmentResponseFixture = new PathSegmentResponseFixture();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task Handle_WhenCalledWithValidQuery_ShouldReturnSuccessResult()
|
||||
{
|
||||
@@ -115,5 +110,4 @@ public class GetPathRootQueryHandlerTests
|
||||
_mockPathService.Received(1).GetPathRoot(query.Path);
|
||||
_mockMapper.Received(1).Map<PathSegmentResponse>(Arg.Is<PathSegment>(p => p == rootPathSegment));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.GetPathR
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetPathRootQueryValidatorTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly GetPathRootQueryValidator _validator;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetPathRootQueryValidatorTests"/> class.
|
||||
/// </summary>
|
||||
@@ -26,9 +23,7 @@ public class GetPathRootQueryValidatorTests
|
||||
{
|
||||
_validator = new GetPathRootQueryValidator();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
|
||||
{
|
||||
@@ -87,5 +82,4 @@ public class GetPathRootQueryValidatorTests
|
||||
// Assert
|
||||
result.ShouldNotHaveValidationErrorFor(x => x.Path);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -18,12 +18,9 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.GetPathS
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetPathSeparatorQueryHandlerTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IPathService _mockPathService;
|
||||
private readonly GetPathSeparatorQueryHandler _sut;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetPathSeparatorQueryHandlerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -32,9 +29,7 @@ public class GetPathSeparatorQueryHandlerTests
|
||||
_mockPathService = Substitute.For<IPathService>();
|
||||
_sut = new GetPathSeparatorQueryHandler(_mockPathService);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task Handle_WhenCalled_ShouldReturnPathSeparatorResponse()
|
||||
{
|
||||
@@ -101,5 +96,4 @@ public class GetPathSeparatorQueryHandlerTests
|
||||
// Assert
|
||||
await act.Should().NotThrowAsync();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.Validate
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class ValidatePathQueryFixure
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid query to check if paths exist.
|
||||
/// </summary>
|
||||
@@ -25,5 +24,4 @@ public class ValidatePathQueryFixure
|
||||
))
|
||||
.RuleFor(x => x.Path, f => f.System.FilePath());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -18,12 +18,9 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.Validate
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class ValidatePathQueryHandlerTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IPathService _mockPathService;
|
||||
private readonly ValidatePathQueryHandler _sut;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ValidatePathQueryHandlerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -32,9 +29,7 @@ public class ValidatePathQueryHandlerTests
|
||||
_mockPathService = Substitute.For<IPathService>();
|
||||
_sut = new ValidatePathQueryHandler(_mockPathService);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task Handle_WhenCalledWithValidPath_ShouldReturnTrueResponse()
|
||||
{
|
||||
@@ -94,5 +89,4 @@ public class ValidatePathQueryHandlerTests
|
||||
result.IsValid.Should().BeFalse();
|
||||
_mockPathService.Received(1).IsValidPath(Arg.Any<string>());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -14,11 +14,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Pahs.Queries.Validate
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class ValidatePathQueryValidatorTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly ValidatePathQueryValidator _validator;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ValidatePathQueryValidatorTests"/> class.
|
||||
/// </summary>
|
||||
@@ -26,9 +23,7 @@ public class ValidatePathQueryValidatorTests
|
||||
{
|
||||
_validator = new ValidatePathQueryValidator();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
|
||||
{
|
||||
@@ -87,5 +82,4 @@ public class ValidatePathQueryValidatorTests
|
||||
// Assert
|
||||
result.ShouldNotHaveValidationErrorFor(x => x.Path);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -13,7 +13,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Thumbnails.Fixtures;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class ThumbnailResponseFixture
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid query to get a thumbnail.
|
||||
/// </summary>
|
||||
@@ -28,5 +27,4 @@ public class ThumbnailResponseFixture
|
||||
.RuleFor(x => x.Type, f => f.PickRandom<ImageType>())
|
||||
.RuleFor(x => x.Bytes, f => f.Random.Bytes(20));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -12,7 +12,6 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Thumbnails.Queries.Ge
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetThumbnailQueryFixture
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid query to get a thumbnail.
|
||||
/// </summary>
|
||||
@@ -27,5 +26,4 @@ public class GetThumbnailQueryFixture
|
||||
.RuleFor(x => x.Path, f => f.System.FilePath())
|
||||
.RuleFor(x => x.Quality, f => f.Random.Int());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -23,14 +23,11 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Thumbnails.Queries.Ge
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetThumbnailQueryHandlerTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IFixture _fixture;
|
||||
private readonly IThumbnailService _mockThumbnailService;
|
||||
private readonly IMapper _mockMapper;
|
||||
private readonly GetThumbnailQueryHandler _sut;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
public GetThumbnailQueryHandlerTests()
|
||||
{
|
||||
_fixture = new Fixture().Customize(new AutoNSubstituteCustomization());
|
||||
@@ -38,9 +35,7 @@ public class GetThumbnailQueryHandlerTests
|
||||
_mockMapper = Substitute.For<IMapper>();
|
||||
_sut = new GetThumbnailQueryHandler(_mockThumbnailService, _mockMapper);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task Handle_WhenCalledWithValidQuery_ShouldReturnSuccessResult()
|
||||
{
|
||||
@@ -100,5 +95,4 @@ public class GetThumbnailQueryHandlerTests
|
||||
await _mockThumbnailService.Received(1).GetThumbnailAsync(query.Path, query.Quality, cts.Token);
|
||||
_mockMapper.DidNotReceive().Map<ThumbnailResponse>(Arg.Any<Thumbnail>());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -13,11 +13,8 @@ namespace Lumina.Application.UnitTests.Core.FileManagement.Thumbnails.Queries.Ge
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class GetThumbnailQueryValidatorTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly GetThumbnailQueryValidator _validator;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetThumbnailQueryValidatorTests"/> class.
|
||||
/// </summary>
|
||||
@@ -25,9 +22,7 @@ public class GetThumbnailQueryValidatorTests
|
||||
{
|
||||
_validator = new GetThumbnailQueryValidator();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Validate_WhenPathIsNull_ShouldHaveValidationError()
|
||||
{
|
||||
@@ -106,5 +101,4 @@ public class GetThumbnailQueryValidatorTests
|
||||
result.ShouldNotHaveValidationErrorFor(x => x.Quality);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -29,16 +29,13 @@ namespace Lumina.Application.UnitTests.Core.WrittenContentLibrary.BooksLibrary.B
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class AddBookCommandHandlerTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IFixture _fixture;
|
||||
private readonly IUnitOfWork _mockUnitOfWork;
|
||||
private readonly IMapper _mockMapper;
|
||||
private readonly IBookRepository _mockBookRepository;
|
||||
private readonly AddBookCommandHandler _sut;
|
||||
private readonly AddBookCommandFixture _commandBookFixture;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AddBookCommandHandlerTests"/> class.
|
||||
/// </summary>
|
||||
@@ -57,9 +54,7 @@ public class AddBookCommandHandlerTests
|
||||
_sut = new AddBookCommandHandler(_mockUnitOfWork, _mockMapper);
|
||||
_commandBookFixture = new AddBookCommandFixture();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task Handle_WhenCalledWithValidCommand_ShouldReturnSuccessResult()
|
||||
{
|
||||
@@ -274,5 +269,4 @@ public class AddBookCommandHandlerTests
|
||||
await _mockBookRepository.DidNotReceive().InsertAsync(Arg.Any<BookModel>(), Arg.Any<CancellationToken>());
|
||||
await _mockUnitOfWork.DidNotReceive().SaveChangesAsync(Arg.Any<CancellationToken>());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -18,12 +18,9 @@ namespace Lumina.Application.UnitTests.Core.WrittenContentLibrary.BooksLibrary.B
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class AddBookCommandValidatorTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly AddBookCommandFixture _commandBookFixture;
|
||||
private readonly AddBookCommandValidator _validator;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AddBookCommandValidatorTests"/> class.
|
||||
/// </summary>
|
||||
@@ -32,9 +29,7 @@ public class AddBookCommandValidatorTests
|
||||
_validator = new AddBookCommandValidator();
|
||||
_commandBookFixture = new AddBookCommandFixture();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Validate_WhenTitleIsNull_ShouldHaveValidationError()
|
||||
{
|
||||
@@ -1893,5 +1888,4 @@ public class AddBookCommandValidatorTests
|
||||
// Assert
|
||||
result.ShouldNotHaveValidationErrorFor(x => x.Ratings[0].VoteCount);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -22,13 +22,10 @@ namespace Lumina.Application.UnitTests.Core.WrittenContentLibrary.BooksLibrary.B
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class AddBookCommandFixture
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly Fixture _fixture;
|
||||
private readonly Random _random = new();
|
||||
private readonly Faker _faker;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AddBookCommandFixture"/> class.
|
||||
/// </summary>
|
||||
@@ -39,9 +36,7 @@ public class AddBookCommandFixture
|
||||
_fixture.Customizations.Add(new NullableDateOnlySpecimenBuilder());
|
||||
_faker = new Faker();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid command to add a book.
|
||||
/// </summary>
|
||||
@@ -343,5 +338,4 @@ public class AddBookCommandFixture
|
||||
{
|
||||
return input?.Length > maxLength ? input[..maxLength] : input;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -23,11 +23,8 @@ namespace Lumina.DataAccess.UnitTests.Common.DependencyInjection;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class DataAccessLayerServicesTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IFixture _fixture;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DataAccessLayerServicesTests"/> class.
|
||||
/// </summary>
|
||||
@@ -35,9 +32,7 @@ public class DataAccessLayerServicesTests
|
||||
{
|
||||
_fixture = new Fixture().Customize(new AutoNSubstituteCustomization());
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void AddDataAccessLayerServices_WhenBasePathExists_ShouldAddServices()
|
||||
{
|
||||
@@ -88,5 +83,4 @@ public class DataAccessLayerServicesTests
|
||||
IBookRepository? repository = serviceProvider.GetService<IBookRepository>();
|
||||
repository.Should().NotBeNull();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -12,7 +12,6 @@ namespace Lumina.DataAccess.UnitTests.Common.Setup;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public static class BogusExtensions
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Adds <see cref="DateOnly"/> random data generation support to the <see cref="Faker"/> class.
|
||||
/// </summary>
|
||||
@@ -36,5 +35,4 @@ public static class BogusExtensions
|
||||
DateTime endDateTime = end.ToDateTime(TimeOnly.MinValue);
|
||||
return System.DateOnly.FromDateTime(faker.Date.Between(startDateTime, endDateTime));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -12,7 +12,6 @@ namespace Lumina.DataAccess.UnitTests.Common.Setup;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class DateOnlySpecimenBuilder : ISpecimenBuilder
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Adds <see cref="DateOnly"/> support to the AutoFixture library.
|
||||
/// </summary>
|
||||
@@ -25,5 +24,4 @@ public class DateOnlySpecimenBuilder : ISpecimenBuilder
|
||||
return DateOnly.FromDateTime(DateTime.Now);
|
||||
return new NoSpecimen();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -12,7 +12,6 @@ namespace Lumina.DataAccess.UnitTests.Common.Setup;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class NullableDateOnlySpecimenBuilder : ISpecimenBuilder
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Adds <see cref="DateOnly?"/> support to the AutoFixture library.
|
||||
/// </summary>
|
||||
@@ -25,5 +24,4 @@ public class NullableDateOnlySpecimenBuilder : ISpecimenBuilder
|
||||
return (DateOnly?)DateOnly.FromDateTime(DateTime.Now);
|
||||
return new NoSpecimen();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -26,13 +26,10 @@ namespace Lumina.DataAccess.UnitTests.Core.Repositories.Books;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class BookRepositoryTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly LuminaDbContext _mockContext;
|
||||
private readonly BookRepository _sut;
|
||||
private readonly BookModelFixture _bookModelFixture;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BookRepositoryTests"/> class.
|
||||
/// </summary>
|
||||
@@ -42,9 +39,7 @@ public class BookRepositoryTests
|
||||
_sut = new BookRepository(_mockContext);
|
||||
_bookModelFixture = new BookModelFixture();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public async Task InsertAsync_WhenBookDoesNotExist_ShouldAddBookToContextAndReturnCreated()
|
||||
{
|
||||
@@ -194,5 +189,4 @@ public class BookRepositoryTests
|
||||
retrievedBook.Genres.Should().HaveCount(2);
|
||||
retrievedBook.ISBNs.Should().HaveCount(2);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -19,13 +19,10 @@ namespace Lumina.DataAccess.UnitTests.Core.Repositories.Books.Fixtures;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class BookModelFixture
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly Fixture _fixture;
|
||||
private readonly Random _random = new();
|
||||
private readonly Faker _faker;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BookModelFixture"/> class.
|
||||
/// </summary>
|
||||
@@ -37,9 +34,7 @@ public class BookModelFixture
|
||||
_faker = new Faker();
|
||||
ConfigureCustomTypes();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid BookModel.
|
||||
/// </summary>
|
||||
@@ -204,5 +199,4 @@ public class BookModelFixture
|
||||
_fixture.Create<int>()
|
||||
));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -17,11 +17,8 @@ namespace Lumina.DataAccess.UnitTests.Core.Repositories.Common.Factory;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class RepositoryDictionaryTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IFixture _fixture;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RepositoryDictionaryTests"/> class.
|
||||
/// </summary>
|
||||
@@ -29,9 +26,7 @@ public class RepositoryDictionaryTests
|
||||
{
|
||||
_fixture = new Fixture().Customize(new AutoNSubstituteCustomization());
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Add_WhenValidRepositoryItemIsAdded_ShouldIncreaseCount()
|
||||
{
|
||||
@@ -111,5 +106,4 @@ public class RepositoryDictionaryTests
|
||||
Action act = () => repositoryDictionary.Add(nonRepository);
|
||||
act.Should().Throw<ArgumentException>().WithMessage("Value must implement IRepository interface!");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -16,7 +16,6 @@ namespace Lumina.DataAccess.UnitTests.Core.Repositories.Common.Factory;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class RepositoryFactoryTests
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void CreateRepository_WhenCalled_ShouldReturnCorrectRepository()
|
||||
{
|
||||
@@ -47,7 +46,6 @@ public class RepositoryFactoryTests
|
||||
Action act = () => repositoryFactory.CreateRepository<IUnregisteredRepository>();
|
||||
act.Should().Throw<InvalidOperationException>().WithMessage("No service for type 'Lumina.DataAccess.UnitTests.Core.Repositories.Common.Factory.IUnregisteredRepository' has been registered.");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
public interface IUnregisteredRepository { }
|
||||
@@ -24,11 +24,8 @@ namespace Lumina.DataAccess.UnitTests.Core.UoW;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class UnitOfWorkTests
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly IFixture _fixture;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UnitOfWorkTests"/> class.
|
||||
/// </summary>
|
||||
@@ -43,9 +40,7 @@ public class UnitOfWorkTests
|
||||
return Substitute.ForPartsOf<LuminaDbContext>(options);
|
||||
}));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void ResetRepositories_WhenCalled_ShouldClearAllRepositories()
|
||||
{
|
||||
@@ -140,5 +135,4 @@ public class UnitOfWorkTests
|
||||
// Assert
|
||||
await dbContext.Received(1).SaveChangesAsync(cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -12,7 +12,6 @@ namespace Lumina.Domain.UnitTests.Common.Primitives;
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class OptionalTests
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Some_WhenCreatingOptionalWithValue_ShouldHaveValueAndCorrectValue()
|
||||
{
|
||||
@@ -133,5 +132,4 @@ public class OptionalTests
|
||||
// Assert
|
||||
result.Should().BeEmpty();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -20,7 +20,6 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Entiti
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class DirectoryTests
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Create_WhenCalledWithValidParameters_ShouldReturnSuccessfulResult()
|
||||
{
|
||||
@@ -134,5 +133,4 @@ public class DirectoryTests
|
||||
result.IsError.Should().BeFalse();
|
||||
directory.Items.Should().NotContain(item);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -18,7 +18,6 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Entiti
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class FileTests
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Create_WhenCalledWithValidParameters_ShouldReturnSuccessfulResult()
|
||||
{
|
||||
@@ -154,5 +153,4 @@ public class FileTests
|
||||
result.FirstError.Should().Be(Errors.FileManagement.NameCannotBeEmpty);
|
||||
file.Name.Should().Be("file.txt");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -19,11 +19,8 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Entiti
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class DirectoryFixture
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly Faker _faker;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DirectoryFixture"/> class.
|
||||
/// </summary>
|
||||
@@ -31,9 +28,7 @@ public class DirectoryFixture
|
||||
{
|
||||
_faker = new Faker();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="Directory"/>.
|
||||
/// </summary>
|
||||
@@ -112,5 +107,4 @@ public class DirectoryFixture
|
||||
}
|
||||
return CreateDirectory(childItems: childItems);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-6
@@ -18,11 +18,8 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Entiti
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class FileFixture
|
||||
{
|
||||
#region ================================================================== FIELD MEMBERS ================================================================================
|
||||
private readonly Faker _faker;
|
||||
#endregion
|
||||
|
||||
#region ====================================================================== CTOR =====================================================================================
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FileFixture"/> class.
|
||||
/// </summary>
|
||||
@@ -30,9 +27,7 @@ public class FileFixture
|
||||
{
|
||||
_faker = new Faker();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="File"/>.
|
||||
/// </summary>
|
||||
@@ -84,5 +79,4 @@ public class FileFixture
|
||||
FileSystemItemStatus.Accessible
|
||||
).Value;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -15,7 +15,6 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Entiti
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class UnixRootItemFixture
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="UnixRootItem"/>.
|
||||
/// </summary>
|
||||
@@ -29,5 +28,4 @@ public class UnixRootItemFixture
|
||||
throw new InvalidOperationException("Failed to create UnixRootItem: " + string.Join(", ", unixRootItemResult.Errors));
|
||||
return unixRootItemResult.Value;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -17,7 +17,6 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Entiti
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class UnixRootItemTests
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Create_WhenCalledWithDefaultStatus_ShouldReturnSuccessfulResult()
|
||||
{
|
||||
@@ -102,5 +101,4 @@ public class UnixRootItemTests
|
||||
result.FirstError.Should().Be(Errors.FileManagement.ParentNodeCannotBeNull);
|
||||
unixRootItem.Parent.HasValue.Should().BeFalse();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
-2
@@ -18,7 +18,6 @@ namespace Lumina.Domain.UnitTests.Core.Aggregates.FileManagementAggregate.Entiti
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class WindowsRootItemTests
|
||||
{
|
||||
#region ===================================================================== METHODS ===================================================================================
|
||||
[Fact]
|
||||
public void Create_WhenCalledWithValidParameters_ShouldReturnSuccessfulResult()
|
||||
{
|
||||
@@ -144,5 +143,4 @@ public class WindowsRootItemTests
|
||||
result.FirstError.Should().Be(Errors.FileManagement.ParentNodeCannotBeNull);
|
||||
windowsRootItem.Parent.HasValue.Should().BeFalse();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
Loaded 100 of 370 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user