Example #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void addAndRemoveHistoricIdentityLinksForProcessDefinitionWithTenantId() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        public virtual void addAndRemoveHistoricIdentityLinksForProcessDefinitionWithTenantId()
        {
            string resourceName = "org/camunda/bpm/engine/test/api/runtime/oneTaskProcess.bpmn20.xml";

            testRule.deployForTenant(TENANT_1, resourceName);
            testRule.deployForTenant(TENANT_2, resourceName);

            ProcessDefinition processDefinition1 = repositoryService.createProcessDefinitionQuery().processDefinitionKey(PROCESS_DEFINITION_KEY).list().get(0);
            ProcessDefinition processDefinition2 = repositoryService.createProcessDefinitionQuery().processDefinitionKey(PROCESS_DEFINITION_KEY).list().get(1);

            assertNotNull(processDefinition1);
            assertNotNull(processDefinition2);

            testTenantsByProcessDefinition(processDefinition1.Id);
            testTenantsByProcessDefinition(processDefinition2.Id);

            IList <HistoricIdentityLinkLog> historicIdentityLinks = historyService.createHistoricIdentityLinkLogQuery().list();

            assertEquals(historicIdentityLinks.Count, 8);

            // Query test
            HistoricIdentityLinkLogQuery query = historyService.createHistoricIdentityLinkLogQuery();

            assertEquals(query.tenantIdIn(TENANT_1).count(), 4);
            query = historyService.createHistoricIdentityLinkLogQuery();
            assertEquals(query.tenantIdIn(TENANT_2).count(), 4);
        }
Example #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void singleQueryForMultipleTenant()
        public virtual void singleQueryForMultipleTenant()
        {
            startProcessInstanceForTenant(TENANT_1);
            startProcessInstanceForTenant(TENANT_2);
            startProcessInstanceForTenant(TENANT_3);

            HistoricIdentityLinkLogQuery query = historyService.createHistoricIdentityLinkLogQuery();

            assertEquals(query.tenantIdIn(TENANT_1, TENANT_2).count(), 2);

            query = historyService.createHistoricIdentityLinkLogQuery();
            assertEquals(query.tenantIdIn(TENANT_2, TENANT_3).count(), 2);

            query = historyService.createHistoricIdentityLinkLogQuery();
            assertEquals(query.tenantIdIn(TENANT_1, TENANT_2, TENANT_3).count(), 3);
        }
Example #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void addandDeleteHistoricIdentityLinkForSingleTenant()
        public virtual void addandDeleteHistoricIdentityLinkForSingleTenant()
        {
            startProcessInstanceForTenant(TENANT_1);

            HistoricIdentityLinkLog historicIdentityLink = historyService.createHistoricIdentityLinkLogQuery().singleResult();

            taskService.deleteCandidateUser(historicIdentityLink.TaskId, A_USER_ID);

            HistoricIdentityLinkLogQuery query = historyService.createHistoricIdentityLinkLogQuery();

            assertEquals(query.tenantIdIn(TENANT_1).count(), 2);
        }
Example #4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void historicIdentityLinkForMultipleTenant()
        public virtual void historicIdentityLinkForMultipleTenant()
        {
            startProcessInstanceForTenant(TENANT_1);

            // Query test
            HistoricIdentityLinkLog historicIdentityLink = historyService.createHistoricIdentityLinkLogQuery().singleResult();

            assertEquals(historicIdentityLink.TenantId, TENANT_1);

            // start process instance for another tenant
            startProcessInstanceForTenant(TENANT_2);

            // Query test
            IList <HistoricIdentityLinkLog> historicIdentityLinks = historyService.createHistoricIdentityLinkLogQuery().list();

            assertEquals(historicIdentityLinks.Count, 2);

            HistoricIdentityLinkLogQuery query = historyService.createHistoricIdentityLinkLogQuery();

            assertEquals(query.tenantIdIn(TENANT_1).count(), 1);

            query = historyService.createHistoricIdentityLinkLogQuery();
            assertEquals(query.tenantIdIn(TENANT_2).count(), 1);
        }