@Test public void testShow() throws Exception { presenter.show(); assertEquals(1, presenter.panels.size()); assertEquals(dataSetPanel, presenter.panels.get(0)); verify(view, times(1)).clear(); verify(view, times(1)).addPanel(any(DataSetPanel.View.class)); verify(dataSetPanel, times(1)).show(dataSetDef, "dataSetsExplorerPanelGroup"); }
public void show() { clear(); clientServices.getPublicDataSetDefs(dataSetDefs -> { if (dataSetDefs != null && !dataSetDefs.isEmpty()) { dataSetDefs.stream() .filter(DataSetExplorer.this::isSupported) .sorted((o1, o2) -> o1.getName().compareTo(o2.getName())) .forEach(DataSetExplorer.this::addDataSetDef); } }); }
DataSetExplorer implements IsWidget { public void show() { clear(); clientServices.getPublicDataSetDefs(dataSetDefs -> { if (dataSetDefs != null && !dataSetDefs.isEmpty()) { dataSetDefs.stream() .filter(DataSetExplorer.this::isSupported) .sorted((o1, o2) -> o1.getName().compareTo(o2.getName())) .forEach(DataSetExplorer.this::addDataSetDef); } }); } }
DataSetExplorer implements IsWidget { public void show() { clear(); clientServices.getPublicDataSetDefs(dataSetDefs -> { if (dataSetDefs != null && !dataSetDefs.isEmpty()) { dataSetDefs.stream() .filter(DataSetExplorer.this::isSupported) .sorted((o1, o2) -> o1.getName().compareTo(o2.getName())) .forEach(DataSetExplorer.this::addDataSetDef); } }); } @Inject  DataSetExplorer(final Instance<DataSetPanel> panelInstances,
                           final DataSetClientServices clientServices,
                           final View view); }
DataSetExplorer implements IsWidget { public void show() { clear(); clientServices.getPublicDataSetDefs(dataSetDefs -> { if (dataSetDefs != null && !dataSetDefs.isEmpty()) { dataSetDefs.stream() .filter(DataSetExplorer.this::isSupported) .sorted((o1, o2) -> o1.getName().compareTo(o2.getName())) .forEach(DataSetExplorer.this::addDataSetDef); } }); } @Inject  DataSetExplorer(final Instance<DataSetPanel> panelInstances,
                           final DataSetClientServices clientServices,
                           final View view); @PostConstruct void init(); @Override Widget asWidget(); void show(); }
DataSetExplorer implements IsWidget { public void show() { clear(); clientServices.getPublicDataSetDefs(dataSetDefs -> { if (dataSetDefs != null && !dataSetDefs.isEmpty()) { dataSetDefs.stream() .filter(DataSetExplorer.this::isSupported) .sorted((o1, o2) -> o1.getName().compareTo(o2.getName())) .forEach(DataSetExplorer.this::addDataSetDef); } }); } @Inject  DataSetExplorer(final Instance<DataSetPanel> panelInstances,
                           final DataSetClientServices clientServices,
                           final View view); @PostConstruct void init(); @Override Widget asWidget(); void show();  }