mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 18:21:10 +00:00
Updates the provider configuration and ownership tests
Covers the provider and reader choices saved with a library, the reconciliation and stale configuration deletion in the provider store, the library type lookups, the ownership and permission checks for update and delete, and the validator behavior for enum names.
This commit is contained in:
1 parent
48ad8692af
commit
64e5163229
127 files changed
+5541
-5296
No files matched your search
+4
-5
@@ -44,7 +44,7 @@ public class UpdateLibraryEndpointTests
|
||||
// Arrange
|
||||
UpdateLibraryRequest request = _updateLibraryRequestFixture.Create();
|
||||
CancellationToken cancellationToken = CancellationToken.None;
|
||||
LibraryResponse expectedResponse = _libraryResponseFixture.Create(id: request.Id, userId: request.UserId);
|
||||
LibraryResponse expectedResponse = _libraryResponseFixture.Create(id: request.Id);
|
||||
_mockHandler.HandleAsync(Arg.Any<UpdateLibraryCommand>(), Arg.Any<CancellationToken>())
|
||||
.Returns(Result.From(expectedResponse));
|
||||
|
||||
@@ -92,7 +92,7 @@ public class UpdateLibraryEndpointTests
|
||||
completionThresholdPercentage: 65);
|
||||
CancellationToken cancellationToken = CancellationToken.None;
|
||||
_mockHandler.HandleAsync(Arg.Any<UpdateLibraryCommand>(), Arg.Any<CancellationToken>())
|
||||
.Returns(Result.From(_libraryResponseFixture.Create(id: request.Id, userId: request.UserId)));
|
||||
.Returns(Result.From(_libraryResponseFixture.Create(id: request.Id)));
|
||||
|
||||
// Act
|
||||
await _sut.ExecuteAsync(request, cancellationToken);
|
||||
@@ -101,7 +101,6 @@ public class UpdateLibraryEndpointTests
|
||||
await _mockHandler.Received(1).HandleAsync(
|
||||
Arg.Is<UpdateLibraryCommand>(command =>
|
||||
command.Id == request.Id &&
|
||||
command.OwnerId == request.UserId &&
|
||||
command.Title == request.Title &&
|
||||
command.LibraryType == request.LibraryType &&
|
||||
command.ContentLocations == request.ContentLocations &&
|
||||
@@ -126,7 +125,7 @@ public class UpdateLibraryEndpointTests
|
||||
completionThresholdPercentage: null);
|
||||
CancellationToken cancellationToken = CancellationToken.None;
|
||||
_mockHandler.HandleAsync(Arg.Any<UpdateLibraryCommand>(), Arg.Any<CancellationToken>())
|
||||
.Returns(Result.From(_libraryResponseFixture.Create(id: request.Id, userId: request.UserId)));
|
||||
.Returns(Result.From(_libraryResponseFixture.Create(id: request.Id)));
|
||||
|
||||
// Act
|
||||
await _sut.ExecuteAsync(request, cancellationToken);
|
||||
@@ -154,7 +153,7 @@ public class UpdateLibraryEndpointTests
|
||||
operationStarted.SetResult(true);
|
||||
await cancellationRequested.Task;
|
||||
callInfo.Arg<CancellationToken>().ThrowIfCancellationRequested();
|
||||
return Result.From(_libraryResponseFixture.Create(id: request.Id, userId: request.UserId));
|
||||
return Result.From(_libraryResponseFixture.Create(id: request.Id));
|
||||
}, callInfo.Arg<CancellationToken>()));
|
||||
|
||||
// Act
|
||||
|
||||
Reference in new issue
Block a user