public Amount Add(Amount amountOne, Amount amountTwo) { var normalizedAmountTwo = currencyAdaptor.Adapt(amountTwo, amountOne.Currency); var result = decorated.Add(amountOne, normalizedAmountTwo); return(result); }
public Amount Add(Amount amountOne, Amount amountTwo) { log.Trace("Adding amount {0} to amount {1}.", amountTwo, amountOne); var result = decorated.Add(amountOne, amountTwo); log.Trace("Result of add is {0}.", result); return(result); }
public Amount Add(Amount amountOne, Amount amountTwo) { Assert.NotNull(amountOne, nameof(amountOne)); Assert.NotNull(amountTwo, nameof(amountTwo)); Assert.Equal(amountOne.Currency.Code, amountTwo.Currency.Code, "Can only add amounts with the same currency."); var result = decorated.Add(amountOne, amountTwo); return(result); }