GraphWalker / graphwalker-project

This is the repo for the Model-based testing tool GraphWalker.

Home Page:http://graphwalker.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failure when parsing GeneratorFactory.parse("randompath(length(80))")

gw4e opened this issue · comments

commented

Hi

The following parsing fails and it should not since length (integer) is a documented stop condition .
GeneratorFactory.parse("randompath(length(80))")

Adding the following test in GeneratorFactoryTest.java exhibit the problem :

@test
public void randompath_length_coverage() {
PathGenerator generator = GeneratorFactory.parse("randompath(length(80))");
Assert.assertThat(generator, instanceOf(RandomPath.class));
Assert.assertThat(generator.getStopCondition(), instanceOf(Length.class));
Assert.assertThat(((Length) generator.getStopCondition()).getLength(), is(80l));
}

Regards.

Looks like the class GeneratorLoader, that is used by the GeneratorFactory, doesn't support the Length condition. I guess that this was missed when the GeneratorLoader was implemented.

commented

I created a pull request.

Fixed by PR #141