public void FieldInterviewReportQueryService_FindFINarrative()
        {
            //Create Report
            CreateFieldInterviewReport();
            var fieldInterviewReportCommandService = GetDependency <IFieldInterviewReportCommandService>();

            Assert.IsInstanceOfType(fieldInterviewReportCommandService, typeof(IFieldInterviewReportCommandService));

            // Create FI Narrative Report
            var  narrativeDetails = MockObjects.NewFieldInterviewNarrative;
            Guid narrativeId      = fieldInterviewReportCommandService.CreateFieldInterviewNarrative(reportId, narrativeDetails);

            Assert.IsInstanceOfType(narrativeId, typeof(Guid));
            Assert.AreNotEqual(narrativeId, Guid.Empty);

            // Find FI Narrative Report
            var fIReportQueryService = GetDependency <IFieldInterviewReportQueryService>();

            Assert.IsInstanceOfType(fIReportQueryService, typeof(IFieldInterviewReportQueryService));
            FieldInterviewNarrative fieldInterviewNarrative = fIReportQueryService.FindFieldInterviewNarrative(narrativeId);

            Assert.IsNotNull(fieldInterviewNarrative);
            Assert.AreEqual(narrativeDetails.SectionNumber, fieldInterviewNarrative.SectionNumber);
            Assert.AreEqual(narrativeId, fieldInterviewNarrative.Id);
        }
示例#2
0
        public void FieldInterviewSummaryQueryService_FindFieldInterviewNarrative()
        {
            CreateFieldInterviewSummary();
            CreateFieldInterviewNarrative();

            // Find FI Narrative Summary Report
            var fISummaryQueryService = GetDependency <IFieldInterviewSummaryQueryService>();

            Assert.IsInstanceOfType(fISummaryQueryService, typeof(IFieldInterviewSummaryQueryService));
            FieldInterviewNarrative fieldInterviewNarrative = fISummaryQueryService.FindFieldInterviewNarrative(narrativeId);

            Assert.IsNotNull(fieldInterviewNarrative);
        }