public void TestCalculateTax_Food_NotImported() { ProductFactory productFactory = new FoodFactory(); var name = "Huge Candies"; var price = 8.99m; var qty = 3; bool isImported = false; Product food = productFactory.CreateProduct(name, price, qty, isImported); decimal expectedTax = 0m; var actualTax = food.CalculateTax(TaxSettings); Assert.AreEqual(expectedTax, actualTax); }
public void TestCalculateTax_Food_Imported() { ProductFactory productFactory = new FoodFactory(); var name = "Box of Chocolates"; var price = 11.25m; var qty = 2; bool isImported = true; Product food = productFactory.CreateProduct(name, price, qty, isImported); decimal expectedTax = 1.20m; var actualTax = food.CalculateTax(TaxSettings); Assert.AreEqual(expectedTax, actualTax); }