//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testHistoricSeedJobLogForBatchDeletion() public virtual void testHistoricSeedJobLogForBatchDeletion() { ProcessDefinition processDefinition = testRule.deployAndGetDefinition(instance); Batch batch = helper.startBeforeAsync("process1", 1, "user1", processDefinition.Id); // when DateTime deletionDate = helper.addSecondsToClock(12); rule.ManagementService.deleteBatch(batch.Id, false); // then a deletion historic job log was added HistoricJobLog jobLog = helper.getHistoricSeedJobLog(batch)[1]; assertNotNull(jobLog); assertTrue(jobLog.DeletionLog); assertEquals(deletionDate, jobLog.Timestamp); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testLogCreation() public virtual void testLogCreation() { // given ProcessDefinition processDefinition = testRule.deployAndGetDefinition(instance); rule.IdentityService.AuthenticatedUserId = "userId"; // when helper.startBeforeAsync("process1", 10, "user2", processDefinition.Id); rule.IdentityService.clearAuthentication(); // then IList <UserOperationLogEntry> opLogEntries = rule.HistoryService.createUserOperationLogQuery().operationType(org.camunda.bpm.engine.history.UserOperationLogEntry_Fields.OPERATION_TYPE_MODIFY_PROCESS_INSTANCE).list(); Assert.assertEquals(2, opLogEntries.Count); IDictionary <string, UserOperationLogEntry> entries = asMap(opLogEntries); UserOperationLogEntry asyncEntry = entries["async"]; Assert.assertNotNull(asyncEntry); Assert.assertEquals("ProcessInstance", asyncEntry.EntityType); Assert.assertEquals("ModifyProcessInstance", asyncEntry.OperationType); Assert.assertEquals(processDefinition.Id, asyncEntry.ProcessDefinitionId); Assert.assertEquals(processDefinition.Key, asyncEntry.ProcessDefinitionKey); Assert.assertNull(asyncEntry.ProcessInstanceId); Assert.assertNull(asyncEntry.OrgValue); Assert.assertEquals("true", asyncEntry.NewValue); Assert.assertEquals(org.camunda.bpm.engine.history.UserOperationLogEntry_Fields.CATEGORY_OPERATOR, asyncEntry.Category); UserOperationLogEntry numInstancesEntry = entries["nrOfInstances"]; Assert.assertNotNull(numInstancesEntry); Assert.assertEquals("ProcessInstance", numInstancesEntry.EntityType); Assert.assertEquals("ModifyProcessInstance", numInstancesEntry.OperationType); Assert.assertEquals(processDefinition.Id, numInstancesEntry.ProcessDefinitionId); Assert.assertEquals(processDefinition.Key, numInstancesEntry.ProcessDefinitionKey); Assert.assertNull(numInstancesEntry.ProcessInstanceId); Assert.assertNull(numInstancesEntry.OrgValue); Assert.assertEquals("10", numInstancesEntry.NewValue); Assert.assertEquals(org.camunda.bpm.engine.history.UserOperationLogEntry_Fields.CATEGORY_OPERATOR, numInstancesEntry.Category); Assert.assertEquals(asyncEntry.OperationId, numInstancesEntry.OperationId); }