public void CalculateSalaryIllnes100MonthlyTest() { //Arange RateRegular rateRegular = new RateRegular(DateTime.Now, 3333f, RateType.monthly); SalaryIllness salary = new SalaryIllness(employee.IdEmployee, date); salary.NumberOfMinutesIllness100 = 960;//16 double should = 317.43d; //Act var result = salary.CalculateSalaryIllness100(rateRegular, hoursToWork); //Arrange Assert.AreEqual(should, result); }
public void CalculateSalaryDayOffHourlyTest() { //Arange RateRegular rateRegular = new RateRegular(DateTime.Now, 20.3f, RateType.hourly); SalaryDayOff salary = new SalaryDayOff(employee.IdEmployee, date); salary.NumberOfMinutesDayOffPaid = 960;//16 double should = 324.80d; //Act var result = salary.CalculateSalaryDayOff(rateRegular, hoursToWork); //Arrange Assert.AreEqual(should, result); }
public void CalculateSalaryRegularMonthlyTest() { //Arange RateRegular rateRegular = new RateRegular(DateTime.Now, 3333f, RateType.monthly); employee.RateRegular = rateRegular; SalaryWork salaryWork = new SalaryWork(employee.IdEmployee, date); salaryWork.NumberOfMinutesAll = 9120 + 1590 + 1955; //152+... salaryWork.NumberOfMinutes100 = 1590; //26:30 salaryWork.NumberOfMinutes50 = 1955; //32:35 double should = 3015.58d; //Act var result = salaryWork.CalculateSalaryRegular(rateRegular, hoursToWork); //Arrange Assert.AreEqual(should, result); }