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)); }
private void Scan(Article article, int quantity) { _currentPurchase.Add(article, quantity, _taxEngine.TaxFor(article, _country)); }