public Checkout(Country country, Catalog catalog, TaxEngine taxEngine) { _country = country; _taxEngine = taxEngine; _catalog = catalog; _currentPurchase = new Purchase(_country); }
public void BasicTaxAndImportDutyForImportedNonBasicTaxExemptArticles(Category category) { var article = new Article(1, Country.Ita, category, Guid.NewGuid().ToString(), 100); var taxEngine = new TaxEngine(); var tax = taxEngine.TaxFor(article, Country.Usa); Assert.Equal(new BasicTaxAndImportDuty().ApplyTo(article.Price), tax.ApplyTo(article.Price)); }
public void BasicTaxForLocalNonBasicTaxExemptArticles(Category category) { var article = new Article(1, Country.Ita, category, Guid.NewGuid().ToString(), 100); var taxEngine = new TaxEngine(); var tax = taxEngine.TaxFor(article, article.SupplierCountry); Assert.Equal(new BasicTax().ApplyTo(article.Price), tax.ApplyTo(article.Price)); }