public virtual void testQueryAuthenticatedTenants() { identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE, TENANT_TWO)); DeploymentQuery query = repositoryService.createDeploymentQuery(); 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 createDeploymentDisabledTenantCheck() public virtual void createDeploymentDisabledTenantCheck() { processEngineConfiguration.TenantCheckEnabled = false; identityService.setAuthentication("user", null, null); repositoryService.createDeployment().addModelInstance("emptyProcessOne", emptyProcess).tenantId(TENANT_ONE).deploy(); repositoryService.createDeployment().addModelInstance("emptyProcessTwo", startEndProcess).tenantId(TENANT_TWO).deploy(); DeploymentQuery query = repositoryService.createDeploymentQuery(); assertThat(query.count(), @is(2L)); assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(1L)); assertThat(query.tenantIdIn(TENANT_TWO).count(), @is(1L)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void redeployForDifferentAuthenticatedTenantsDisabledTenantCheck() public virtual void redeployForDifferentAuthenticatedTenantsDisabledTenantCheck() { Deployment deploymentOne = repositoryService.createDeployment().addModelInstance("emptyProcess.bpmn", emptyProcess).addModelInstance("startEndProcess.bpmn", startEndProcess).tenantId(TENANT_ONE).deploy(); identityService.setAuthentication("user", null, null); processEngineConfiguration.TenantCheckEnabled = false; repositoryService.createDeployment().addDeploymentResources(deploymentOne.Id).tenantId(TENANT_TWO).deploy(); DeploymentQuery query = repositoryService.createDeploymentQuery(); assertThat(query.count(), @is(2L)); assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(1L)); assertThat(query.tenantIdIn(TENANT_TWO).count(), @is(1L)); }
public virtual void testAutoDeployTenantId() { createAppContext(CTX_TENANT_ID_PATH); DeploymentQuery deploymentQuery = repositoryService.createDeploymentQuery(); assertEquals(1, deploymentQuery.tenantIdIn("tenant1").count()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void deleteDeploymentDisabledTenantCheck() public virtual void deleteDeploymentDisabledTenantCheck() { Deployment deploymentOne = testRule.deployForTenant(TENANT_ONE, emptyProcess); Deployment deploymentTwo = testRule.deployForTenant(TENANT_TWO, startEndProcess); processEngineConfiguration.TenantCheckEnabled = false; identityService.setAuthentication("user", null, null); repositoryService.deleteDeployment(deploymentOne.Id); repositoryService.deleteDeployment(deploymentTwo.Id); DeploymentQuery query = repositoryService.createDeploymentQuery(); assertThat(query.count(), @is(0L)); assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(0L)); assertThat(query.tenantIdIn(TENANT_TWO).count(), @is(0L)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void redeployForTheSameAuthenticatedTenant() public virtual void redeployForTheSameAuthenticatedTenant() { Deployment deploymentOne = repositoryService.createDeployment().addModelInstance("emptyProcess.bpmn", emptyProcess).addModelInstance("startEndProcess.bpmn", startEndProcess).tenantId(TENANT_ONE).deploy(); identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE)); repositoryService.createDeployment().addDeploymentResources(deploymentOne.Id).tenantId(TENANT_ONE).deploy(); DeploymentQuery query = repositoryService.createDeploymentQuery(); assertThat(query.count(), @is(2L)); assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(2L)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void createDeploymentWithAuthenticatedTenant() public virtual void createDeploymentWithAuthenticatedTenant() { identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE)); repositoryService.createDeployment().addModelInstance("emptyProcess.bpmn", emptyProcess).tenantId(TENANT_ONE).deploy(); identityService.clearAuthentication(); DeploymentQuery query = repositoryService.createDeploymentQuery(); assertThat(query.count(), @is(1L)); assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(1L)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void deleteDeploymentWithAuthenticatedTenant() public virtual void deleteDeploymentWithAuthenticatedTenant() { Deployment deployment = testRule.deployForTenant(TENANT_ONE, emptyProcess); identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE)); repositoryService.deleteDeployment(deployment.Id); identityService.clearAuthentication(); DeploymentQuery query = repositoryService.createDeploymentQuery(); assertThat(query.count(), @is(0L)); assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(0L)); }