public void SickHoursTest() { TimeCard Card = new TimeCard(_startDate); Card.SetHours(_theNextFriday, HourType.SICK, 8); Assert.AreEqual(8, Card.GetHours(_theNextFriday, HourType.SICK)); }
public void GetTotalHoursTest() { TimeCard Card = new TimeCard(_startDate); DateTime TempDate = _startDate; for (int x = 0; x < 14; x++) { Card.SetHours(TempDate, HourType.WORKING, 3); Card.SetHours(TempDate, HourType.SICK, 4); Card.SetHours(TempDate, HourType.VACATION, 5); TempDate = TempDate.AddDays(1); } Assert.AreEqual(42, Card.GetTotalHours(HourType.WORKING)); Assert.AreEqual(56, Card.GetTotalHours(HourType.SICK)); Assert.AreEqual(70, Card.GetTotalHours(HourType.VACATION)); }
public void OvertimeTest() { TimeCard Card = new TimeCard(_startDate); DateTime TempDate = _startDate; for (int x = 0; x < 14; x++) { Card.SetHours(TempDate, HourType.WORKING, 8); TempDate = TempDate.AddDays(1); } Assert.AreEqual(32, Card.CalculateOvertime()); }
public void VacationHoursTest() { TimeCard Card = new TimeCard(_startDate); Card.SetHours(_theNextFriday, HourType.VACATION, 8); Assert.AreEqual(8, Card.GetHours(_theNextFriday, HourType.VACATION)); }
public void WorkingHoursTest() { TimeCard Card = new TimeCard(_startDate); Card.SetHours(_theNextFriday, HourType.WORKING, 8); Assert.AreEqual(8, Card.GetHours(_theNextFriday, HourType.WORKING)); }