BATCH-1507: search path for steps extended in FlowJob

This commit is contained in:
dsyer
2010-02-08 10:38:52 +00:00
parent c2a2b59d64
commit 87c839d7f0
2 changed files with 23 additions and 0 deletions

View File

@@ -518,6 +518,23 @@ public class FlowJobTests {
assertEquals("step2", step.getName());
}
@Test
public void testGetStepExistsWithPrefix() throws Exception {
SimpleFlow flow = new SimpleFlow("job");
List<StateTransition> transitions = new ArrayList<StateTransition>();
transitions.add(StateTransition.createStateTransition(new StepState("job.step", new StubStep("step")), "end0"));
transitions.add(StateTransition.createEndStateTransition(new EndState(FlowExecutionStatus.COMPLETED, "end0")));
flow.setStateTransitions(transitions);
flow.afterPropertiesSet();
job.setFlow(flow);
job.setName(flow.getName());
job.afterPropertiesSet();
Step step = job.getStep("step");
assertNotNull(step);
assertEquals("step", step.getName());
}
@Test
public void testGetStepNotExists() throws Exception {
SimpleFlow flow = new SimpleFlow("job");