SelectorSliderDisplayer extends AbstractGwtDisplayer<SelectorSliderDisplayer.View> { @Override public View getView() { return view; } @Inject  SelectorSliderDisplayer(View view, DateParameterEditor minDateEditor,
                                   DateParameterEditor maxDateEditor,
                                   NumberParameterEditor minNumberEditor,
                                   NumberParameterEditor maxNumberEditor); @Override View getView(); @Override DisplayerConstraints createDisplayerConstraints(); Object getSelectedMin(); Object getSelectedMax();  }
@Test public void testNoData() { DisplayerSettings dateSelectorSettings = DisplayerSettingsFactory.newSelectorSettings() .dataset(EXPENSES) .filter(COLUMN_DATE, FilterFactory.isNull()) .column(COLUMN_DATE) .buildSettings(); SelectorSliderDisplayer presenter = createSelectorDisplayer(dateSelectorSettings); SelectorSliderDisplayer.View view = presenter.getView(); presenter.draw(); verify(view).noData(); verify(view, never()).showSlider(anyInt(), anyInt(), anyInt(), anyInt(), anyInt()); }
@Test public void testDateAllNullNoData() { for (int i = 0; i < 50; i++) { expensesDataSet.setValueAt(i, 4, null); } SelectorSliderDisplayer presenter = createSelectorDisplayer(dateSelectorSettings); presenter.draw(); verify(presenter.getView()).noData(); }
@Test public void testNumberAllNullNoData() { for (int i = 0; i < 50; i++) { expensesDataSet.setValueAt(i, 5, null); } SelectorSliderDisplayer presenter = createSelectorDisplayer(numberSelectorSettings); presenter.draw(); verify(presenter.getView()).noData(); }