public void CallForServiceSummaryQueryService_FindCallForServiceResponse()
        {
            // Create ReportId
            var systemQuery = GetDependency <ISystemQueryService>();

            Assert.IsInstanceOfType(systemQuery, typeof(ISystemQueryService));
            var cfsCommandService = GetDependency <ICallForServiceSummaryCommandService>();

            Assert.IsInstanceOfType(cfsCommandService, typeof(ICallForServiceSummaryCommandService));

            var callForServiceDetails = MockObjects.NewCallForServiceSummary;

            Guid summaryId = cfsCommandService.CreateCallForServiceSummary(systemQuery.GetAgencies()[0].AgencyId, "Random Case #" + new Random().Next(int.MaxValue), callForServiceDetails);

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

            // Create CFS Response Report
            Guid responseId = cfsCommandService.CreateCallForServiceResponse(summaryId, MockObjects.NewCallForServiceResponse);

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

            // Find CFS Response Report
            var cfsSummaryQueryService = GetDependency <ICallForServiceSummaryQueryService>();

            Assert.IsInstanceOfType(cfsSummaryQueryService, typeof(ICallForServiceSummaryQueryService));
            CallForServiceResponse callForServiceResponse = cfsSummaryQueryService.FindCallForServiceResponse(responseId);

            Assert.IsNotNull(callForServiceResponse);
        }
Exemple #2
0
 private void SetUpCallForServiceResponse()
 {
     _callForServiceResponse = new CallForServiceResponse(DataEntryUnitTestFixture.IdentityId, DataEntryUnitTestFixture.AgencyDetails.Id, Guid.NewGuid());
     _reportsUnitOfWork.Setup(mock => mock.Find <CallForServiceResponse>(It.IsAny <Guid>(), It.IsAny <TrackingMode>(), It.IsAny <ThrowIf>()))
     .Returns(_callForServiceResponse);
 }