//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testCreateBothJobDefinitionWithParseListenerAndAsynBothInXml() public virtual void testCreateBothJobDefinitionWithParseListenerAndAsynBothInXml() { //given the asyncBefore AND asyncAfter is set in the xml string modelFileName = "jobAsyncBothCreationWithinParseListener.bpmn20.xml"; Stream @in = typeof(JobDefinitionCreationWithParseListenerTest).getResourceAsStream(modelFileName); DeploymentBuilder builder = engineRule.RepositoryService.createDeployment().addInputStream(modelFileName, @in); //when the asyncBefore and asyncAfter is set to true in the parse listener Deployment deployment = builder.deploy(); engineRule.manageDeployment(deployment); //then there exists two job definitions JobDefinitionQuery query = engineRule.ManagementService.createJobDefinitionQuery(); IList <JobDefinition> definitions = query.orderByJobConfiguration().asc().list(); assertEquals(definitions.Count, 2); //asyncAfter JobDefinition asyncAfterAfter = definitions[0]; assertEquals(asyncAfterAfter.ProcessDefinitionKey, "oneTaskProcess"); assertEquals(asyncAfterAfter.ActivityId, "servicetask1"); assertEquals(asyncAfterAfter.JobConfiguration, MessageJobDeclaration.ASYNC_AFTER); //asyncBefore JobDefinition asyncAfterBefore = definitions[1]; assertEquals(asyncAfterBefore.ProcessDefinitionKey, "oneTaskProcess"); assertEquals(asyncAfterBefore.ActivityId, "servicetask1"); assertEquals(asyncAfterBefore.JobConfiguration, MessageJobDeclaration.ASYNC_BEFORE); }