@Test public void a_local_include_is_found_by_parser() { String plantUml="@startuml context\n" + "!include C4_Context.puml\n" + "\n" + "Person(administrator, \"Administrator\")\n" + "System(jenkins, \"Jenkins\")\n" + "Rel(administrator, jenkins, \"Administrates Jenkins\", \"SSH\")\n" + "\n" + "@enduml"; PlantUMLModel model = parserToTest.parse(plantUml); List<PlantUMLInclude> includes = model.getIncludes(); assertEquals(1,includes.size()); PlantUMLInclude include = includes.get(0); assertEquals("C4_Context.puml", include.getLocation()); assertEquals(2, include.getLineNumber()); }
public PlantUMLModel parse(String text) { PlantUMLModel model = new PlantUMLModel(); String[] lines = text.split("\n"); int lineNr = 1; for (String line: lines) { inspectLine(line, lineNr++,model); } return model; }
SimplePlantUMLParser { public PlantUMLModel parse(String text) { PlantUMLModel model = new PlantUMLModel(); String[] lines = text.split("\n"); int lineNr = 1; for (String line: lines) { inspectLine(line, lineNr++,model); } return model; } }
SimplePlantUMLParser { public PlantUMLModel parse(String text) { PlantUMLModel model = new PlantUMLModel(); String[] lines = text.split("\n"); int lineNr = 1; for (String line: lines) { inspectLine(line, lineNr++,model); } return model; }  }
SimplePlantUMLParser { public PlantUMLModel parse(String text) { PlantUMLModel model = new PlantUMLModel(); String[] lines = text.split("\n"); int lineNr = 1; for (String line: lines) { inspectLine(line, lineNr++,model); } return model; }  PlantUMLModel parse(String text); }
SimplePlantUMLParser { public PlantUMLModel parse(String text) { PlantUMLModel model = new PlantUMLModel(); String[] lines = text.split("\n"); int lineNr = 1; for (String line: lines) { inspectLine(line, lineNr++,model); } return model; }  PlantUMLModel parse(String text);  }