@Test public void should_addASequence_forEachFeatureCallResults() throws Exception { FixtureCallResult fixtureCallResult1 = new FixtureCallResult(new FixtureCall(null, "name1",12,new Fixture(getMethod1(),null),new ArrayList<String>(),0), Issue.SUCCEEDED); FixtureCallResult fixtureCallResult2 = new FixtureCallResult(new FixtureCall(null, "name2",12,new Fixture(getMethod2(),null),new ArrayList<String>(),0), Issue.SUCCEEDED); List<FixtureCallResult> fixtureCallResults = new ArrayList<FixtureCallResult>(); fixtureCallResults.add(fixtureCallResult1); fixtureCallResults.add(fixtureCallResult2); String actualScript = tested.getPlantUmlScript(fixtureCallResults); Lines lines = new Lines(actualScript); assertEquals("alice -[#green]> bob:Method 1", lines.get(12)); assertEquals("bob --[#green]> alice:method2", lines.get(13)); }
public String getPlantUmlScript(List<FixtureCallResult> fixtureCallResults) { String plantUml = "@startuml\n" + style + "\n"; for (FixtureCallResult fixtureCallResut : fixtureCallResults) { plantUml += generateSequence(fixtureCallResut); } plantUml += "@enduml"; return plantUml; }
PlantUmlSequenceDiagramGenerator { public String getPlantUmlScript(List<FixtureCallResult> fixtureCallResults) { String plantUml = "@startuml\n" + style + "\n"; for (FixtureCallResult fixtureCallResut : fixtureCallResults) { plantUml += generateSequence(fixtureCallResut); } plantUml += "@enduml"; return plantUml; } }
PlantUmlSequenceDiagramGenerator { public String getPlantUmlScript(List<FixtureCallResult> fixtureCallResults) { String plantUml = "@startuml\n" + style + "\n"; for (FixtureCallResult fixtureCallResut : fixtureCallResults) { plantUml += generateSequence(fixtureCallResut); } plantUml += "@enduml"; return plantUml; }  }
PlantUmlSequenceDiagramGenerator { public String getPlantUmlScript(List<FixtureCallResult> fixtureCallResults) { String plantUml = "@startuml\n" + style + "\n"; for (FixtureCallResult fixtureCallResut : fixtureCallResults) { plantUml += generateSequence(fixtureCallResut); } plantUml += "@enduml"; return plantUml; }  String getPlantUmlScript(List<FixtureCallResult> fixtureCallResults); String generateInstructionWithParameter(FixtureCall testFixture); }
PlantUmlSequenceDiagramGenerator { public String getPlantUmlScript(List<FixtureCallResult> fixtureCallResults) { String plantUml = "@startuml\n" + style + "\n"; for (FixtureCallResult fixtureCallResut : fixtureCallResults) { plantUml += generateSequence(fixtureCallResut); } plantUml += "@enduml"; return plantUml; }  String getPlantUmlScript(List<FixtureCallResult> fixtureCallResults); String generateInstructionWithParameter(FixtureCall testFixture); public String style; public String succeededColor; public String failedColor; public String ignoredColor; }