mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 11: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
+3
-3
@@ -26,7 +26,7 @@ public class ThumbnailTests
|
||||
byte[] bytes = [1, 2, 3, 4, 5];
|
||||
|
||||
// Act
|
||||
Thumbnail thumbnail = new(type, bytes);
|
||||
Thumbnail thumbnail = _thumbnailFixture.Create(type, bytes);
|
||||
|
||||
// Assert
|
||||
Assert.Equal(type, thumbnail.Type);
|
||||
@@ -38,7 +38,7 @@ public class ThumbnailTests
|
||||
{
|
||||
// Arrange
|
||||
Thumbnail thumbnail1 = _thumbnailFixture.Create();
|
||||
Thumbnail thumbnail2 = new(thumbnail1.Type, thumbnail1.Bytes);
|
||||
Thumbnail thumbnail2 = _thumbnailFixture.Create(thumbnail1.Type, thumbnail1.Bytes);
|
||||
|
||||
// Act
|
||||
bool result = thumbnail1.Equals(thumbnail2);
|
||||
@@ -80,7 +80,7 @@ public class ThumbnailTests
|
||||
{
|
||||
// Arrange
|
||||
Thumbnail thumbnail1 = _thumbnailFixture.Create();
|
||||
Thumbnail thumbnail2 = new(thumbnail1.Type, thumbnail1.Bytes);
|
||||
Thumbnail thumbnail2 = _thumbnailFixture.Create(thumbnail1.Type, thumbnail1.Bytes);
|
||||
|
||||
// Act
|
||||
int hashCode1 = thumbnail1.GetHashCode();
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ public class MovieTests
|
||||
List<Rating> ratings = [CreateRating(4.5m)];
|
||||
|
||||
// Act
|
||||
Movie movie = new(id, metadata, contributors, ratings);
|
||||
Movie movie = _movieFixture.Create(id, metadata, contributors, ratings);
|
||||
|
||||
// Assert
|
||||
Assert.Equal(id, movie.Id);
|
||||
|
||||
Reference in new issue
Block a user