mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 16: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 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