public void ICanNotFindAnInspectionReport() { IInspectionReportService service = new InspectionReportService(_repo, _unit); var result = service.GetInspectionReportByInspectionNo("ABCDEG"); Assert.IsTrue(result.Count() == 0); }
public void ICanUpdateASpecificInspectionReport() { IInspectionReportService service = new InspectionReportService(_repo, _unit); DateTime dateNow = DateTime.Now; var tempReport = new InspectionReport { InspectionNo = "ABCDEF", InspectionDate = dateNow, StructureNo = "000000", DeckType = "SandPaper", IsMaintenanceRequired = true, IsHighwayBridge = true }; service.UpdateInspectionReport(tempReport); var result = service.GetInspectionReportByInspectionNo("ABCDEF"); Assert.IsTrue(result.Count() == 1); var report = result.FirstOrDefault(); Assert.IsTrue(report.InspectionNo == tempReport.InspectionNo); Assert.IsTrue(report.DeckType == tempReport.DeckType); Assert.IsTrue(report.InspectionDate == tempReport.InspectionDate); Assert.IsTrue(report.IsHighwayBridge == tempReport.IsHighwayBridge); Assert.IsTrue(report.IsMaintenanceRequired == tempReport.IsMaintenanceRequired); Assert.IsTrue(report.StructureNo == tempReport.StructureNo); }
public void ICanGetASpecificInspectionReport() { IInspectionReportService service = new InspectionReportService(_repo, _unit); var result = service.GetInspectionReportByInspectionNo("ABCDEF"); Assert.IsTrue(result.Count() == 1); Assert.IsTrue(result.FirstOrDefault().DeckType == _report.DeckType); Assert.IsTrue(result.FirstOrDefault().InspectionDate == _report.InspectionDate); Assert.IsTrue(result.FirstOrDefault().IsHighwayBridge == _report.IsHighwayBridge); }