public void Edit_NewReportWithoutTimes_EditsBaseReport() { var oldReport = CreateReportWithTime(); var newReport = CreateReportWithoutTime(); var builder = new KMDAbsenceReportBuilder(); var list = builder.Edit(oldReport, newReport); Assert.AreEqual(KMDAbsenceOperation.Edit, list[1].KmdAbsenceOperation); }
public void Edit_NewReportWithoutTimes_DeletesEndTimeReport() { var oldReport = CreateReportWithTime(); var newReport = CreateReportWithoutTime(); var builder = new KMDAbsenceReportBuilder(); var list = builder.Edit(oldReport, newReport); Assert.AreEqual(KMDAbsenceOperation.Delete, list.Last().KmdAbsenceOperation); }
public void Edit_NewReportWithoutTimes_Returns3Reports() { var oldReport = CreateReportWithTime(); var newReport = CreateReportWithoutTime(); var builder = new KMDAbsenceReportBuilder(); var list = builder.Edit(oldReport, newReport); Assert.AreEqual(3, list.Count); }
public void Edit_OnlyBasePeriodEdited_Returns1Report() { var oldReport = CreateReportWithoutTime(); var newReport = CreateReportWithoutTime(); var builder = new KMDAbsenceReportBuilder(); var list = builder.Edit(oldReport, newReport); Assert.AreEqual(1, list.Count); }
public void Edit_OnlyBasePeriodEdited_BasePeriodOperationIsEdited() { var oldReport = CreateReportWithoutTime(); var newReport = CreateReportWithoutTime(); var builder = new KMDAbsenceReportBuilder(); var list = builder.Edit(oldReport, newReport); Assert.AreEqual(KMDAbsenceOperation.Edit, list.First().KmdAbsenceOperation); }
public void Edit_NewReportWithoutStartTime_OldStartTimeIsDeleted() { var oldReport = CreateReportWithStartTime(); var newReport = CreateReportWithoutTime(); var builder = new KMDAbsenceReportBuilder(); var list = builder.Edit(oldReport, newReport); Assert.AreEqual(KMDAbsenceOperation.Delete, list.First().KmdAbsenceOperation); }