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