DropDownImageListEditor extends ImageListEditor<T> implements HasEditMode { @Override public void isEditMode(final boolean isEdit) { this.isEditMode = isEdit; showElements(); } @Inject  DropDownImageListEditor(DropDownImageListEditorView<T> dropDownImageListEditorView, Event<ValueChangeEvent<T>> valueChangeEvent); protected  DropDownImageListEditor(ImageListEditorView<T> imageListEditorView, Event<ValueChangeEvent<T>> valueChangeEvent); @Override void isEditMode(final boolean isEdit);  }
@Test public void testEditModeEnabled() throws Exception { presenter.setEntries(expectedEntries); ((DropDownImageListEditor)presenter).isEditMode(true); assertEquals(true, ((DropDownImageListEditor) presenter).isEditMode); verify( ((DropDownImageListEditor.View)view) , times(2)).setDropDown(true); }
@Test public void testEditModeDisabled() throws Exception { presenter.setEntries(expectedEntries); ((DropDownImageListEditor)presenter).isEditMode(false); assertEquals(false, ((DropDownImageListEditor) presenter).isEditMode); verify( ((DropDownImageListEditor.View)view) , times(1)).setDropDown(false); }