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