public void CallForServiceSummaryQueryService_FindCallForServiceCaseReceived() { // 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 Case Received Report Guid caseReceivedId = cfsCommandService.CreateCallForServiceCaseReceived(summaryId, MockObjects.NewCallForServiceCaseReceived); Assert.IsInstanceOfType(caseReceivedId, typeof(Guid)); Assert.AreNotEqual(caseReceivedId, Guid.Empty); // Find CFS Case Received Report var cfsSummaryQueryService = GetDependency <ICallForServiceSummaryQueryService>(); Assert.IsInstanceOfType(cfsSummaryQueryService, typeof(ICallForServiceSummaryQueryService)); CallForServiceCaseReceived callForServiceCaseReceived = cfsSummaryQueryService.FindCallForServiceCaseReceived(caseReceivedId); Assert.IsNotNull(callForServiceCaseReceived); }
private void SetUpCallForServiceCaseReceived() { _callForServiceCaseReceived = new CallForServiceCaseReceived(DataEntryUnitTestFixture.IdentityId, DataEntryUnitTestFixture.AgencyDetails.Id, Guid.NewGuid()); _reportsUnitOfWork.Setup(mock => mock.Find <CallForServiceCaseReceived>(It.IsAny <Guid>(), It.IsAny <TrackingMode>(), It.IsAny <ThrowIf>())) .Returns(_callForServiceCaseReceived); }