mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 07: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
+2
-1
@@ -30,6 +30,7 @@ public class LibraryRepositoryTests
|
||||
{
|
||||
private readonly LibraryEntityFixture _libraryEntityFixture = new();
|
||||
private readonly UserEntityFixture _userEntityFixture = new();
|
||||
private readonly LibraryContentLocationEntityFixture _libraryContentLocationEntityFixture = new();
|
||||
|
||||
[Fact]
|
||||
public async Task UpdateAsync_WhenNothingChanged_ShouldNotChangeTheLibraryAudit()
|
||||
@@ -78,7 +79,7 @@ public class LibraryRepositoryTests
|
||||
LibraryEntity incoming = await LoadDetachedLibraryAsync(context, library.Id);
|
||||
incoming.ContentLocations.Clear();
|
||||
foreach (string path in new[] { "/media/one", "/media/keep", "/media/three" })
|
||||
incoming.ContentLocations.Add(new LibraryContentLocationEntity { Path = path });
|
||||
incoming.ContentLocations.Add(_libraryContentLocationEntityFixture.Create(path: path));
|
||||
|
||||
// Act
|
||||
Result<Updated> result = await sut.UpdateAsync(incoming, CancellationToken.None);
|
||||
|
||||
Reference in new issue
Block a user