Refactors the test fixtures and their consumers to compose other fixtures instead of instantiating models inline

This commit is contained in:
BinaryAlley committed 2026-10-02 14:37:23 +03:00
1 parent 0abda472c6
commit 3aadd6de84
157 files changed
+1312 -597

No files matched your search

@@ -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
@@ -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