public void ThrowNotFoundException() { // Arrange handler = new DeleteLedgerEntryCommandHandler(_Database); DeleteLedgerEntryCommand command = new DeleteLedgerEntryCommand() { Id = 2 }; // Assert Assert.ThrowsAsync <NotFoundException> (() => handler.Handle(command, CancellationToken.None)); }
public async Task DeleteLedgerEntrySuccessfuly() { // Arrange handler = new DeleteLedgerEntryCommandHandler(_Database); DeleteLedgerEntryCommand command = new DeleteLedgerEntryCommand() { Id = 10 }; // Act var result = await handler.Handle(command, CancellationToken.None); // Assert Assert.Equal(Unit.Value, result); }