use of co.rsk.test.dsl.DslProcessorException in project rskj by rsksmart.
the class WorldDslProcessorTest method failedAssertBestCommand.
@Test
public void failedAssertBestCommand() {
World world = new World();
WorldDslProcessor processor = new WorldDslProcessor(world);
DslParser parser = new DslParser("block_chain g00 b01 b02\nblock_connect b01 b02\nassert_best b01");
try {
processor.processCommands(parser);
Assert.fail();
} catch (DslProcessorException ex) {
Assert.assertEquals("Expected best block 'b01'", ex.getMessage());
}
}
use of co.rsk.test.dsl.DslProcessorException in project rskj by rsksmart.
the class WorldDslProcessorTest method raiseIfUnknownCommand.
@Test
public void raiseIfUnknownCommand() {
WorldDslProcessor processor = new WorldDslProcessor(new World());
try {
processor.processCommands(new DslParser("foo"));
Assert.fail();
} catch (DslProcessorException ex) {
Assert.assertEquals("Unknown command 'foo'", ex.getMessage());
}
}
Aggregations