DataSetDefBackendCacheAttributesEditor implements IsWidget,
                                                               org.dashbuilder.dataset.client.editor.DataSetDefBackendCacheAttributesEditor { @PostConstruct public void init() { view.init(viewCallback); view.init(DataSetEditorConstants.INSTANCE.backendCache(), DataSetEditorConstants.INSTANCE.rows(), cacheEnabled.asWidget(), cacheMaxRows.view); cacheMaxRows.addHelpContent(DataSetEditorConstants.INSTANCE.attributeMaxRows(), DataSetEditorConstants.INSTANCE.attributeMaxRows_description(), Placement.BOTTOM); } @Inject  DataSetDefBackendCacheAttributesEditor(final ToggleSwitchEditor cacheEnabled,
                                                  final ValueBoxEditor<Integer> cacheMaxRows,
                                                  final DataSetDefCacheAttributesEditorView view); @PostConstruct void init(); void setRange(final Double min,
                         final Double max); @Override Widget asWidget(); @Override ToggleSwitchEditor cacheEnabled(); @Override ValueBoxEditor<Integer> cacheMaxRows(); @Override void flush(); @Override void onPropertyChange(final String... paths); @Override void setValue(final DataSetDef value); @Override void setDelegate(final EditorDelegate<DataSetDef> delegate); public DataSetDefCacheAttributesEditorView view; }
@Test public void testInit() { presenter.init(); verify(cacheMaxRows, times(1)).addHelpContent(anyString(), anyString(), any(Placement.class)); verify(view, times(1)).init(any(DataSetDefCacheAttributesEditorView.ViewCallback.class)); verify(view, times(1)).init(anyString(), anyString(), any(IsWidget.class), any(ValueBoxEditor.View.class)); verify(view, times(0)).setRange(anyDouble(), anyDouble()); verify(view, times(0)).setValue(anyDouble()); verify(view, times(0)).setEnabled(anyBoolean()); }