//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testDeployProcessArchive() public virtual void testDeployProcessArchive() { Assert.assertNotNull(ProgrammaticBeanLookup.lookup(typeof(ProcessEngine))); // no deployment has been constructed Assert.assertEquals(0, repositoryService.createDeploymentQuery().deploymentName("pa").count()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testResourceName() public virtual void testResourceName() { ProcessEngine processEngine = ProgrammaticBeanLookup.lookup(typeof(ProcessEngine)); Assert.assertNotNull(processEngine); RepositoryService repositoryService = processEngine.RepositoryService; ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery(); ProcessDefinition definition = query.processDefinitionKey("process-0").singleResult(); Assert.assertEquals("process0.bpmn", definition.ResourceName); definition = query.processDefinitionKey("process-1").singleResult(); Assert.assertEquals("processes/process1.bpmn", definition.ResourceName); definition = query.processDefinitionKey("process-2").singleResult(); Assert.assertEquals("process2.bpmn", definition.ResourceName); definition = query.processDefinitionKey("process-3").singleResult(); Assert.assertEquals("subDirectory/process3.bpmn", definition.ResourceName); definition = query.processDefinitionKey("process-4").singleResult(); Assert.assertEquals("process4.bpmn", definition.ResourceName); definition = query.processDefinitionKey("process-5").singleResult(); Assert.assertEquals("subDirectory/process5.bpmn", definition.ResourceName); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testLookupBean() public virtual void testLookupBean() { deployer.deploy("normal"); object lookup = ProgrammaticBeanLookup.lookup("testOnly"); assertThat(lookup, instanceOf(typeof(TestBean))); deployer.undeploy("normal"); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testLookupShouldFindAlternative() public virtual void testLookupShouldFindAlternative() { deployer.deploy("withAlternative"); object lookup = ProgrammaticBeanLookup.lookup("testOnly"); //JAVA TO C# CONVERTER WARNING: The .NET Type.FullName property will not always yield results identical to the Java Class.getName method: assertThat(lookup.GetType().FullName, @is(equalTo(typeof(AlternativeTestBean).FullName))); deployer.undeploy("withAlternative"); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test @OperateOnDeployment("clientDeployment") public void testResolveClass() public virtual void testResolveClass() { // assert that we cannot resolve the bean here: Assert.assertNull(ProgrammaticBeanLookup.lookup("exampleSignallableActivityBehaviorBean")); // but the process can since it performs context switch to the process archive for execution ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("testResolveBean"); runtimeService.signal(processInstance.Id); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testDeployProcessArchive() public virtual void testDeployProcessArchive() { ProcessEngine processEngine = ProgrammaticBeanLookup.lookup(typeof(ProcessEngine)); Assert.assertNotNull(processEngine); RepositoryService repositoryService = processEngine.RepositoryService; long count = repositoryService.createProcessDefinitionQuery().processDefinitionKey("testDeployProcessArchive").count(); Assert.assertEquals(1, count); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test @Deployment public void testBusinessKeyInjectable() public virtual void testBusinessKeyInjectable() { string businessKey = "Activiti"; string pid = runtimeService.startProcessInstanceByKey("keyOfTheProcess", businessKey).Id; getBeanInstance(typeof(BusinessProcess)).associateExecutionById(pid); // assert that now the businessKey-Bean can be looked up: Assert.assertEquals(businessKey, ProgrammaticBeanLookup.lookup("businessKey")); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldReturnBpmnModelInstance() public virtual void shouldReturnBpmnModelInstance() { runtimeService.startProcessInstanceByKey(TEST_PROCESS); BpmnElementRetrievalDelegate @delegate = ProgrammaticBeanLookup.lookup(typeof(BpmnElementRetrievalDelegate)); Assert.assertNotNull(@delegate.BpmnModelElementInstance); Assert.assertNotNull(@delegate.BpmnModelInstance); Assert.assertEquals(TEST_PROCESS, @delegate.BpmnModelInstance.Definitions.RootElements.GetEnumerator().next().Id); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test @OperateOnDeployment("clientDeployment") public void testResolveBean() public virtual void testResolveBean() { // assert that we cannot resolve the bean here: Assert.assertNull(ProgrammaticBeanLookup.lookup("exampleBean")); Assert.assertEquals(0, runtimeService.createProcessInstanceQuery().processDefinitionKey("testResolveBean").count()); // but the process engine can: runtimeService.startProcessInstanceByKey("testResolveBean"); Assert.assertEquals(0, runtimeService.createProcessInstanceQuery().processDefinitionKey("testResolveBean").count()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testProcessEngineInject() public virtual void testProcessEngineInject() { //given only default engine exist //when TestClass is created InjectedProcessEngineBean testClass = ProgrammaticBeanLookup.lookup(typeof(InjectedProcessEngineBean)); Assert.assertNotNull(testClass); //then default engine is injected Assert.assertEquals("default", testClass.processEngine.Name); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testPaAsEjbModule() public virtual void testPaAsEjbModule() { ProcessEngine processEngine = ProgrammaticBeanLookup.lookup(typeof(ProcessEngine)); Assert.assertNotNull(processEngine); runtimeService.startProcessInstanceByKey("paAsEjbJar-process"); Assert.assertEquals(1, runtimeService.createProcessInstanceQuery().count()); waitForJobExecutorToProcessAllJobs(); Assert.assertEquals(0, runtimeService.createProcessInstanceQuery().count()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testMultipleClasspathRoots() public virtual void testMultipleClasspathRoots() { ProcessEngine processEngine = ProgrammaticBeanLookup.lookup(typeof(ProcessEngine)); Assert.assertNotNull(processEngine); RepositoryService repositoryService = processEngine.RepositoryService; ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery(); long count = query.count(); Assert.assertEquals(1, count); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testLookupShouldSupportProducerMethods() public virtual void testLookupShouldSupportProducerMethods() { deployer.deploy("withProducerMethod"); assertEquals("exampleString", ProgrammaticBeanLookup.lookup("producedString")); deployer.undeploy("withProducerMethod"); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testDeployProcessArchive() public virtual void testDeployProcessArchive() { Assert.assertNotNull(ProgrammaticBeanLookup.lookup(typeof(ProcessEngine))); }