Beispiel #1
0
        public void CalculateTax_ShouldReturn_Correct()
        {
            var grossSalary    = 3400m;
            var expectedResult = 540m;

            var servicesCollection = new List <ITaxCalculator>
            {
                new SocialTaxService(),
                new IncomeTaxService()
            };

            var salaryService = new SalaryService(servicesCollection);

            var result = salaryService.CalculateTaxes(grossSalary);

            Assert.AreEqual(expectedResult, result);
        }