mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 12:11:10 +00:00
Refactors the test fixtures and their consumers to compose other fixtures instead of instantiating models inline
This commit is contained in:
1 parent
0abda472c6
commit
3aadd6de84
157 files changed
+1312
-597
No files matched your search
+1
-1
@@ -103,7 +103,7 @@ public class CheckPathExistsQueryHandlerTests
|
||||
public async Task HandleAsync_WhenCalledWithNullPath_ShouldStillCallPathService()
|
||||
{
|
||||
// Arrange
|
||||
CheckPathExistsQuery query = new(null!, false);
|
||||
CheckPathExistsQuery query = _checkPathExistsQueryFixture.Create(includePath: false, shouldIncludeHiddenElements: false);
|
||||
_mockPathService.Exists(Arg.Any<string>(), Arg.Any<bool>()).Returns(false);
|
||||
|
||||
// Act
|
||||
|
||||
+2
-2
@@ -73,7 +73,7 @@ public class ValidatePathQueryHandlerTests
|
||||
public async Task HandleAsync_WhenCalledWithNullPath_ShouldReturnFalseResponse()
|
||||
{
|
||||
// Arrange
|
||||
ValidatePathQuery query = new(null!);
|
||||
ValidatePathQuery query = _validatePathQueryFixture.Create(includePath: false);
|
||||
_mockPathService.IsValidPath(Arg.Any<string>()).Returns(false);
|
||||
|
||||
// Act
|
||||
@@ -89,7 +89,7 @@ public class ValidatePathQueryHandlerTests
|
||||
public async Task HandleAsync_WhenCalledWithEmptyPath_ShouldReturnFalseResponse()
|
||||
{
|
||||
// Arrange
|
||||
ValidatePathQuery query = new(string.Empty);
|
||||
ValidatePathQuery query = _validatePathQueryFixture.Create(string.Empty);
|
||||
_mockPathService.IsValidPath(Arg.Any<string>()).Returns(false);
|
||||
|
||||
// Act
|
||||
|
||||
Reference in new issue
Block a user