public async void ShouldDecoratedTransactionHandlerAndThrowException() { var command = new AnyCommand(); var decorator = new ExceptionCommandDcorator(); var transactionHandler = new TransactionHandler <AnyCommand>(unitOfWork, decorator); await Assert.ThrowsAsync <Exception>(() => transactionHandler.ExecuteAsync(command)); }
public async void ShouldDecoratedTransactionHandlerAndSum() { var command = new AnyCommand(); var decorator = new AnyCommandDcorator(); var transactionHandler = new TransactionHandler <AnyCommand>(unitOfWork, decorator); await transactionHandler.ExecuteAsync(command); Assert.Equal(1, command.Cout); }