public void PensionIsCalculatedProperlyForProperData(decimal hours, decimal rate, decimal expected) { // Arrange var sut = new GermanySalaryCalculator { GrossAmount = hours * rate }; // Act var result = sut.CalculatePension(); // Assert Assert.AreEqual(expected, result); }
public void PensionIsEqualZeroWhenHoursOrRateIsNegative(decimal hours, decimal rate) { // Arrange var sut = new GermanySalaryCalculator { GrossAmount = hours * rate }; decimal expected = 0; // Act var result = sut.CalculatePension(); // Assert Assert.AreEqual(expected, result); }