public void FindReportComments() { _reportComment = _report.AddComment(DataEntryUnitTestFixture.IdentityId, "User1", "Description1"); var reportComments = _reportCommentQueryService.FindReportComments(It.IsAny <Guid>()); reportComments.Should().NotBeEmpty(); reportComments.Count.Should().Be(2); }
public void ClassSetUp() { _factory = new MockRepository(MockBehavior.Loose); _reportsUnitOfWork = _factory.Create <IReportsUnitOfWork>(); _report = new ReportDerived(DataEntryUnitTestFixture.IdentityId, DataEntryUnitTestFixture.AgencyDetails.Id, Guid.NewGuid(), Guid.NewGuid(), ModuleType.Arrest, false); _reportComment = _report.AddComment(DataEntryUnitTestFixture.IdentityId, "User", "Description"); _reportsUnitOfWork.Setup(mock => mock.FindAndInclude <Report>(It.IsAny <Guid>(), It.IsAny <TrackingMode>(), It.IsAny <ThrowIf>())).Returns(_report); _reportCommentQueryService = new ReportCommentQueryService(_reportsUnitOfWork.Object, Mock.Of <ILog>(), Mock.Of <IServiceAuthorizationPolicy>(), Mock.Of <IServiceIdentityProvider>()); }