mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 10: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
@@ -40,7 +40,7 @@ public class CheckPathExistsRequestMappingTests
|
||||
public void ToQuery_WhenMappingWithDifferentPathsAndHiddenElementsFlag_ShouldMapCorrectly(string path, bool shouldIncludeHiddenElements)
|
||||
{
|
||||
// Arrange
|
||||
CheckPathExistsRequest request = new(path, shouldIncludeHiddenElements);
|
||||
CheckPathExistsRequest request = _checkPathExistsRequestFixture.Create(path, shouldIncludeHiddenElements);
|
||||
|
||||
// Act
|
||||
CheckPathExistsQuery result = request.ToQuery();
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class CombinePathRequestMappingTests
|
||||
public void ToCommand_WhenMappingWithDifferentPaths_ShouldMapCorrectly(string originalPath, string newPath)
|
||||
{
|
||||
// Arrange
|
||||
CombinePathRequest request = new(originalPath, newPath);
|
||||
CombinePathRequest request = _combinePathRequestFixture.Create(originalPath, newPath);
|
||||
|
||||
// Act
|
||||
CombinePathCommand result = request.ToCommand();
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ public class GetPathParentRequestMappingTests
|
||||
public void ToQuery_WhenMappingWithDifferentPaths_ShouldMapCorrectly(string path)
|
||||
{
|
||||
// Arrange
|
||||
GetPathParentRequest request = new(path);
|
||||
GetPathParentRequest request = _getPathParentRequestFixture.Create(path);
|
||||
|
||||
// Act
|
||||
GetPathParentQuery result = request.ToQuery();
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class GetPathRootRequestMappingTests
|
||||
public void ToQuery_WhenMappingWithDifferentPaths_ShouldMapCorrectly(string path)
|
||||
{
|
||||
// Arrange
|
||||
GetPathRootRequest request = new(path);
|
||||
GetPathRootRequest request = _getPathRootRequestFixture.Create(path);
|
||||
|
||||
// Act
|
||||
GetPathRootQuery result = request.ToQuery();
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class SplitPathRequestMappingTests
|
||||
public void ToCommand_WhenMappingWithDifferentPaths_ShouldMapCorrectly(string path)
|
||||
{
|
||||
// Arrange
|
||||
SplitPathRequest request = new(path);
|
||||
SplitPathRequest request = _splitPathRequestFixture.Create(path);
|
||||
|
||||
// Act
|
||||
SplitPathCommand result = request.ToCommand();
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ public class ValidatePathRequestMappingTests
|
||||
public void ToQuery_WhenMappingWithDifferentPaths_ShouldMapCorrectly(string path)
|
||||
{
|
||||
// Arrange
|
||||
ValidatePathRequest request = new(path);
|
||||
ValidatePathRequest request = _validatePathRequestFixture.Create(path);
|
||||
|
||||
// Act
|
||||
ValidatePathQuery result = request.ToQuery();
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class GetThumbnailRequestMappingTests
|
||||
public void ToQuery_WhenMappingWithDifferentPathsAndQualities_ShouldMapCorrectly(string path, int quality)
|
||||
{
|
||||
// Arrange
|
||||
GetThumbnailRequest request = new(path, quality);
|
||||
GetThumbnailRequest request = _getThumbnailRequestFixture.Create(path, quality);
|
||||
|
||||
// Act
|
||||
GetThumbnailQuery result = request.ToQuery();
|
||||
|
||||
+2
-2
@@ -53,7 +53,7 @@ public class ThumbnailMappingTests
|
||||
{
|
||||
// Arrange
|
||||
byte[] bytes = [.. _fixture.CreateMany<byte>(100)];
|
||||
Thumbnail domainModel = new(imageType, bytes);
|
||||
Thumbnail domainModel = _thumbnailFixture.Create(imageType, bytes);
|
||||
|
||||
// Act
|
||||
ThumbnailResponse result = domainModel.ToResponse();
|
||||
@@ -70,7 +70,7 @@ public class ThumbnailMappingTests
|
||||
// Arrange
|
||||
ImageType imageType = _fixture.Create<ImageType>();
|
||||
byte[] emptyBytes = [];
|
||||
Thumbnail domainModel = new(imageType, emptyBytes);
|
||||
Thumbnail domainModel = _thumbnailFixture.Create(imageType, emptyBytes);
|
||||
|
||||
// Act
|
||||
ThumbnailResponse result = domainModel.ToResponse();
|
||||
|
||||
Reference in new issue
Block a user