AutomataTool { public static void main(String[] args) { new AutomataTool().run(args); }  static void main(String[] args); void run(String[] args); static ASTAutomaton parse(String model); static IAutomataArtifactScope createSymbolTable(ASTAutomaton ast);  }
@Test public void executePingPong() { AutomataTool.main(new String[] { "src/test/resources/example/PingPong.aut", "target/PingPong.autsym" }); Log.printFindings(); assertEquals(0, Log.getFindings().size()); List<String> p = LogStub.getPrints(); assertEquals(7, p.size()); assertTrue(p.get(0), p.get(0).matches(".*.INFO. AutomataTool Automata DSL Tool.*\n")); assertTrue(p.get(5), p.get(5).matches(".*.INFO. AutomataTool Pretty printing automaton into console.*\n")); String res = p.get(p.size()-1).replaceAll("[\r\n]", " "); assertEquals(231, res.length()); assertTrue(res, res.matches(".*state.*")); assertTrue(res, res.matches(".*state NoGame <<initial>>.*")); assertTrue(res, res.matches(".*Pong - returnBall > Ping;.*")); }
@Test public void executeSimple12() { AutomataTool.main(new String[] { "src/test/resources/example/Simple12.aut", "target/Simple12.autsym" }); Log.printFindings(); assertEquals(0, Log.getFindings().size()); List<String> p = LogStub.getPrints(); assertEquals(7, p.size()); }
@Test public void executeHierarchyPingPong() { AutomataTool.main(new String[] { "src/test/resources/example/HierarchyPingPong.aut", "target/HierarchyPingPong.autsym" }); Log.printFindings(); assertEquals(0, Log.getFindings().size()); List<String> p = LogStub.getPrints(); assertEquals(7, p.size()); }