public void CallForServiceSummaryQueryService_FindCallForServiceE911()
        {
            // 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 E911 Report
            Guid e911Id = cfsCommandService.CreateCallForServiceE911(summaryId, MockObjects.NewCallForServiceE911);

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

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

            Assert.IsInstanceOfType(cfsSummaryQueryService, typeof(ICallForServiceSummaryQueryService));
            CallForServiceE911 callForServiceE911 = cfsSummaryQueryService.FindCallForServiceE911(e911Id);

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