public void ReportAttachmentModified_InitializingReportAttachmentForIncidentUpdateEvent()
 {
     _reportAttachmentModified = new ReportAttachmentModified(_identityId, _entityId, _mediaId, ModuleType.Incident, EntityType, EventOperation.Update);
     Assert.AreEqual(_identityId, _reportAttachmentModified.IdentityId);
     Assert.AreEqual(_entityId, _reportAttachmentModified.EntityId);
     Assert.AreEqual(_mediaId, _reportAttachmentModified.MediaId);
     Assert.AreEqual(ModuleType.Incident, _reportAttachmentModified.ModuleType);
     Assert.AreEqual(EntityType, _reportAttachmentModified.EntityType);
     Assert.AreEqual(EventOperation.Update, _reportAttachmentModified.OperationType);
 }
Esempio n. 2
0
 public void ReportAttachmentModified_InitializingReportAttachmentForCitationDeleteEvent()
 {
     reportAttachmentModified = new ReportAttachmentModified(identityId, entityId, mediaId, ModuleType.Citation, entityType, EventOperation.Delete);
     Assert.AreEqual(identityId, reportAttachmentModified.IdentityId);
     Assert.AreEqual(entityId, reportAttachmentModified.EntityId);
     Assert.AreEqual(mediaId, reportAttachmentModified.MediaId);
     Assert.AreEqual(ModuleType.Citation, reportAttachmentModified.ModuleType);
     Assert.AreEqual(entityType, reportAttachmentModified.EntityType);
     Assert.AreEqual(EventOperation.Delete, reportAttachmentModified.OperationType);
 }
        public void Receive_1()
        {
            //Arrange
            var reportAttachmentModified = new ReportAttachmentModified(fixtures.identityId, fixtures.entityId, fixtures.mediaId, Infrastructure.Constants.ModuleType.AgencyAdministration, "entityType", Infrastructure.Constants.EventOperation.Delete);

            //Act
            //fixtures.orphanedMediaRemover.MessageHandler(reportAttachmentModified);

            //Assert
            fixtures.fakes.mediaMetaService.Verify(mock => mock.DeleteMediaById(fixtures.mediaId), Times.Once);
        }