Beispiel #1
0
        public void PensionIsCalculatedProperlyForProperData(decimal hours, decimal rate, decimal expected)
        {
            // Arrange
            var sut = new IrelandSalaryCalculator {
                GrossAmount = hours * rate
            };

            // Act
            var result = sut.CalculatePension();

            // Assert
            Assert.AreEqual(expected, result);
        }
Beispiel #2
0
        public void PensionIsEqualZeroWhenHoursOrRateIsNegative(decimal hours, decimal rate)
        {
            // Arrange
            var sut = new IrelandSalaryCalculator {
                GrossAmount = hours * rate
            };
            decimal expected = 0;

            // Act
            var result = sut.CalculatePension();

            // Assert
            Assert.AreEqual(expected, result);
        }