public void SalesItemTaxDecoratorTaxTest() { SalesItemTaxDecorator taxDecorator = new SalesItemTaxDecorator(new SalesItemStub(10M, 0M), new TaxStub(0.1M)); decimal tax = taxDecorator.GetSalesTax(); Assert.AreEqual(1M, tax); }
public void SalesItemTaxDecoratorTotalTest() { SalesItemTaxDecorator taxDecorator = new SalesItemTaxDecorator(new SalesItemStub(10M, 0M), new TaxStub(0.1M)); decimal total = taxDecorator.GetTotal(); Assert.AreEqual(11M, total); }
public void SalesItemTaxDecoratorPriceTest() { SalesItemTaxDecorator taxDecorator = new SalesItemTaxDecorator(new SalesItemStub(10M, 0M), new TaxStub(0.1M)); decimal price = taxDecorator.GetPrice(); Assert.AreEqual(10M, price); }