示例#1
0
        public void CanCalculateTax()
        {
            int first = new TakeHomeCalculator(TaxRate.Of(10)).NetAmount(Money.Create(40, "GBP"),
                                                                         Money.Create(50, "GBP"),
                                                                         Money.Create(60, "GBP")).value;

            Assert.Equal(135, first);
        }
示例#2
0
 public void CannotSumDifferentCurrencies()
 {
     Assert.Throws <Incalculable>(() => new TakeHomeCalculator(TaxRate.Of(10)).NetAmount(
                                      Money.Create(4, "GBP"), Money.Create(5, "USD")));
 }