mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 17: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
-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
|
||||
}
|
||||
Reference in new issue
Block a user