DataSetDefRefreshIntervalEditor implements IsWidget, org.dashbuilder.dataset.client.editor.DataSetDefRefreshIntervalEditor { @PostConstruct public void init() { view.init(this); for (final DateIntervalType dateInterval : ALLOWED_TYPES) { final String s = DateIntervalTypeConstants.INSTANCE.getString(dateInterval.name()); view.addIntervalTypeItem(s); } } @Inject  DataSetDefRefreshIntervalEditor(final View view,
                                           final Event<org.dashbuilder.common.client.event.ValueChangeEvent<String>> valueChangeEvent); @PostConstruct void init(); @Override Widget asWidget(); void addHelpContent(final String title, final String content, final Placement placement); @Override void setEnabled(final boolean isEnabled); @Override void setValue(final String value); @Override String getValue(); public View view; }
@Test public void testInit() { presenter.init(); verify(view, times(1)).init(presenter); verify(view, times(6)).addIntervalTypeItem(anyString()); verify(view, times(0)).addHelpContent(anyString(), anyString(), any(Placement.class)); verify(view, times(0)).setSelectedIntervalType(anyInt()); verify(view, times(0)).getSelectedIntervalTypeIndex(); verify(view, times(0)).setQuantity(anyDouble()); verify(view, times(0)).getQuantity(); verify(view, times(0)).setEnabled(anyBoolean()); }