public void calculate_bonus_provision()
        {
            //Arrange
            BonusPercentage bonusPercentage = new BonusPercentage();
            bonusPercentage.Percentage = 0.05M;
            Employee employee = new Employee();
            employee.Rate = 25000;
            var data = new MonthlyCost();
            data.Employee = employee;
            //Act
            var result = data.BonusProvision(bonusPercentage);

            //Assert
            Assert.AreEqual(104.17M, result);
        }
Beispiel #2
0
 public decimal BonusProvision(BonusPercentage bonusPercentage)
 {
     var rate = Rate / 12;
     decimal bonusProvision = rate * bonusPercentage.Percentage;
     return decimal.Round(bonusProvision, 2);
 }