Esempio n. 1
0
        public void TaxesServiceRejectsDuplicateTaxes()
        {
            var taxesService = new TaxesService();
            var pstTax1      = new Tax("PST", DateTime.Today, DateTime.Today.AddMonths(6), JurisdictionEnum.City);
            var pstTax2      = new Tax("PST", DateTime.Today, DateTime.Today.AddMonths(6), JurisdictionEnum.City);

            taxesService.AddTax(pstTax1);
            taxesService.AddTax(pstTax2);
        }
Esempio n. 2
0
        public void TaxesServiceRejectsOverlappingTaxesPerTaxType()
        {
            var taxesService = new TaxesService();
            var pstTax1      = new Tax("PST", DateTime.Today, DateTime.Today.AddMonths(6), JurisdictionEnum.City);
            var pstTax2      = new Tax("PST", DateTime.Today.AddMonths(6), DateTime.Today.AddYears(1), JurisdictionEnum.City);

            taxesService.AddTax(pstTax1);
            taxesService.AddTax(pstTax2);
        }
Esempio n. 3
0
        public void TaxesServiceCanAccumulateTaxes()
        {
            var taxesService = new TaxesService();
            var pstTax       = new Tax("PST", DateTime.Today, DateTime.Today.AddMonths(6), JurisdictionEnum.City);

            taxesService.AddTax(pstTax);

            Assert.IsTrue(taxesService.Taxes.Contains(pstTax));
        }