public void ThrowNotFoundExceptionWhenProvidedInvalidId() { // Arrange handler = new UpdateLedgerStatusCommandHandler(_Database); UpdateLedgerStatusCommand command = new UpdateLedgerStatusCommand() { Id = 2, Posted = 1 }; // Assert Assert.ThrowsAsync <NotFoundException> (() => handler.Handle(command, CancellationToken.None)); }
public async Task UpdateLedgerEntryStatusSuccessfuly() { // Arrange handler = new UpdateLedgerStatusCommandHandler(_Database); UpdateLedgerStatusCommand command = new UpdateLedgerStatusCommand() { Id = 10, Posted = 1 }; // Act var result = await handler.Handle(command, CancellationToken.None); // Assert Assert.Equal(Unit.Value, result); }