@Test public void addElementView() { coverageElementPresenterSpy.initElementList(elementListMock); coverageElementPresenterSpy.addElementView("description", "value"); verify(coverageElementViewMock, times(1)).setDescriptionValue(eq("description")); verify(coverageElementViewMock, times(1)).setElementValue(eq("value")); verify(elementListMock, times(1)).appendChild(eq(descriptionNodeMock)); verify(elementListMock, times(1)).appendChild(eq(numberOfTimeNodeMock)); }
@Override public void addElementView(String description, String value) { CoverageElementView coverageElementView = viewsProvider.getCoverageElementView(); coverageElementView.setDescriptionValue(description); coverageElementView.setElementValue(value); this.elementList.appendChild(coverageElementView.getDescription()); this.elementList.appendChild(coverageElementView.getNumberOfTime()); }
CoverageElementPresenter implements CoverageElementView.Presenter { @Override public void addElementView(String description, String value) { CoverageElementView coverageElementView = viewsProvider.getCoverageElementView(); coverageElementView.setDescriptionValue(description); coverageElementView.setElementValue(value); this.elementList.appendChild(coverageElementView.getDescription()); this.elementList.appendChild(coverageElementView.getNumberOfTime()); } }
CoverageElementPresenter implements CoverageElementView.Presenter { @Override public void addElementView(String description, String value) { CoverageElementView coverageElementView = viewsProvider.getCoverageElementView(); coverageElementView.setDescriptionValue(description); coverageElementView.setElementValue(value); this.elementList.appendChild(coverageElementView.getDescription()); this.elementList.appendChild(coverageElementView.getNumberOfTime()); }  }
CoverageElementPresenter implements CoverageElementView.Presenter { @Override public void addElementView(String description, String value) { CoverageElementView coverageElementView = viewsProvider.getCoverageElementView(); coverageElementView.setDescriptionValue(description); coverageElementView.setElementValue(value); this.elementList.appendChild(coverageElementView.getDescription()); this.elementList.appendChild(coverageElementView.getNumberOfTime()); }  @Override void initElementList(HTMLElement elementList); @Override void addElementView(String description, String value); void clear(); }
CoverageElementPresenter implements CoverageElementView.Presenter { @Override public void addElementView(String description, String value) { CoverageElementView coverageElementView = viewsProvider.getCoverageElementView(); coverageElementView.setDescriptionValue(description); coverageElementView.setElementValue(value); this.elementList.appendChild(coverageElementView.getDescription()); this.elementList.appendChild(coverageElementView.getNumberOfTime()); }  @Override void initElementList(HTMLElement elementList); @Override void addElementView(String description, String value); void clear();  }