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
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user