public void FieldInterviewReportQueryService_FindFIOfficer() { // Create Report CreateFieldInterviewReport(); var fieldInterviewReportCommandService = GetDependency <IFieldInterviewReportCommandService>(); Assert.IsInstanceOfType(fieldInterviewReportCommandService, typeof(IFieldInterviewReportCommandService)); // Create FI Officer Report var officerDetails = MockObjects.NewFieldInterviewOfficer; Guid officerId = fieldInterviewReportCommandService.CreateFieldInterviewOfficer(reportId, officerDetails); Assert.IsInstanceOfType(officerId, typeof(Guid)); Assert.AreNotEqual(officerId, Guid.Empty); // Find FI Officer Report var fIReportQueryService = GetDependency <IFieldInterviewReportQueryService>(); Assert.IsInstanceOfType(fIReportQueryService, typeof(IFieldInterviewReportQueryService)); FieldInterviewOfficer fieldInterviewOfficer = fIReportQueryService.FindFieldInterviewOfficer(officerId); Assert.IsNotNull(fieldInterviewOfficer); Assert.AreEqual(officerId, fieldInterviewOfficer.Id); Assert.AreEqual(officerDetails.OfficerName, fieldInterviewOfficer.OfficerName); Assert.AreEqual(officerDetails.InvolvementType, fieldInterviewOfficer.InvolvementType); Assert.AreEqual(officerDetails.SectionNumber, fieldInterviewOfficer.SectionNumber); }
public void FieldInterviewSummaryQueryService_FindFieldInterviewOfficer() { CreateFieldInterviewSummary(); CreateFieldInterviewOfficer(); // Find FI Officer Summary Report var fISummaryQueryService = GetDependency <IFieldInterviewSummaryQueryService>(); Assert.IsInstanceOfType(fISummaryQueryService, typeof(IFieldInterviewSummaryQueryService)); FieldInterviewOfficer fieldInterviewOfficer = fISummaryQueryService.FindFieldInterviewOfficer(officerId); Assert.IsNotNull(fieldInterviewOfficer); }