DataSetDefFilterEditor implements IsWidget, org.dashbuilder.dataset.client.editor.DataSetDefFilterEditor { @Override public void init(DataSetMetadata metadata) { view.setWidget(filterEditor); filterEditor.init(value != null ? value.cloneInstance() : null, metadata); } @Inject  DataSetDefFilterEditor(View view, DataSetFilterEditor filterEditor, final Event<FilterChangedEvent> filterChangedEvent); @Override void init(DataSetMetadata metadata); @Override Widget asWidget(); @Override void flush(); @Override void onPropertyChange(final String... paths); @Override void setValue(final DataSetFilter value); @Override void setDelegate(final EditorDelegate<DataSetFilter> delegate); public View view; }
@Test public void testInit() throws Exception { verify(view).init(tested); }
@Test public void testInitFilterEditor() throws Exception { tested.value = filter1; tested.init(dataSetMetadata); verify(view).setWidget(any(IsWidget.class)); verify(dataSetFilterEditor).init(eq(filter2), eq(dataSetMetadata)); }