//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testNoAuthenticatedTenants() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: public virtual void testNoAuthenticatedTenants() { // given testRule.deployForTenant(TENANT_ONE, PROCESS); testRule.deployForTenant(TENANT_TWO, PROCESS); testRule.deploy(PROCESS); ensureEventSubscriptions(3); identityService.setAuthentication("user", null, null); IDictionary <string, object> variableMap = new Dictionary <string, object>(); variableMap["foo"] = "bar"; // when IList <ProcessInstance> instances = engineRule.RuntimeService.createConditionEvaluation().setVariables(variableMap).evaluateStartConditions(); // then assertNotNull(instances); assertEquals(1, instances.Count); identityService.clearAuthentication(); ProcessInstanceQuery processInstanceQuery = engineRule.RuntimeService.createProcessInstanceQuery(); assertEquals(1, processInstanceQuery.count()); assertEquals(1, processInstanceQuery.withoutTenantId().count()); }
public virtual void testQueryByProcessDefinitionWithoutTenantId() { // when ProcessInstanceQuery query = runtimeService.createProcessInstanceQuery().processDefinitionWithoutTenantId(); // then assertThat(query.count(), @is(1L)); assertThat(query.withoutTenantId().count(), @is(1L)); }
public virtual void testQueryAuthenticatedTenants() { identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE, TENANT_TWO)); ProcessInstanceQuery query = runtimeService.createProcessInstanceQuery(); assertThat(query.count(), @is(3L)); assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(1L)); assertThat(query.tenantIdIn(TENANT_TWO).count(), @is(1L)); assertThat(query.withoutTenantId().count(), @is(1L)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void timerStartEventWithTimerCycle() public virtual void timerStartEventWithTimerCycle() { testRule.deployForTenant(TENANT_ONE, Bpmn.createExecutableProcess().startEvent().timerWithCycle("R2/PT1M").userTask().endEvent().done()); // execute first timer cycle Job job = managementService.createJobQuery().singleResult(); assertThat(job.TenantId, @is(TENANT_ONE)); managementService.executeJob(job.Id); // execute second timer cycle job = managementService.createJobQuery().singleResult(); assertThat(job.TenantId, @is(TENANT_ONE)); managementService.executeJob(job.Id); ProcessInstanceQuery query = runtimeService.createProcessInstanceQuery(); assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(2L)); assertThat(query.withoutTenantId().count(), @is(0L)); }
public virtual void testQueryByProcessDefinitionWithoutTenantId_VaryingProcessInstanceTenantId() { // given StaticTenantIdTestProvider tenantIdProvider = new StaticTenantIdTestProvider(null); processEngineConfiguration.TenantIdProvider = tenantIdProvider; tenantIdProvider.TenantIdProvider = "anotherTenantId"; runtimeService.createProcessInstanceByKey("testProcess").processDefinitionWithoutTenantId().execute(); // when ProcessInstanceQuery query = runtimeService.createProcessInstanceQuery().processDefinitionWithoutTenantId(); // then assertThat(query.count(), @is(2L)); assertThat(query.withoutTenantId().count(), @is(1L)); assertThat(query.tenantIdIn("anotherTenantId").count(), @is(1L)); // cleanup processEngineConfiguration.TenantIdProvider = null; }