Ejemplo n.º 1
0
        public void WhenSalaryIsZero_ShouldReturnZero(TaxYear taxYear)
        {
            //Arrange
            var taxRepo = new StubTaxRepository {TaxRate = 10};
            var taxHelper = new TaxHelper(TaxYear.Year2013, taxRepo);
            const int salaryExpected = 0;

            //Act
            var salaryResulted = taxHelper.Calculate(0);

            //Assert
            Assert.That(salaryResulted, Is.EqualTo(salaryExpected));
        }
Ejemplo n.º 2
0
        public void When2014_ShouldReturn80Percent()
        {
            //Arrange
            var taxRepo = new StubTaxRepository {TaxRate = 20};
            var taxHelper = new TaxHelper(TaxYear.Year2013, taxRepo);
            const int salaryExpected = 800;

            //Act
            var salaryResulted = taxHelper.Calculate(1000);

            //Assert
            Assert.That(salaryResulted, Is.EqualTo(salaryExpected));
        }
Ejemplo n.º 3
0
        public void WhenSalaryIsZero_ShouldReturnZero(TaxYear taxYear)
        {
            //Arrange
            var taxRepo = new StubTaxRepository {
                TaxRate = 10
            };
            var       taxHelper      = new TaxHelper(TaxYear.Year2013, taxRepo);
            const int salaryExpected = 0;

            //Act
            var salaryResulted = taxHelper.Calculate(0);

            //Assert
            Assert.That(salaryResulted, Is.EqualTo(salaryExpected));
        }
Ejemplo n.º 4
0
        public void When2014_ShouldReturn80Percent()
        {
            //Arrange
            var taxRepo = new StubTaxRepository {
                TaxRate = 20
            };
            var       taxHelper      = new TaxHelper(TaxYear.Year2013, taxRepo);
            const int salaryExpected = 800;

            //Act
            var salaryResulted = taxHelper.Calculate(1000);

            //Assert
            Assert.That(salaryResulted, Is.EqualTo(salaryExpected));
        }