@Test public void testSetup() { final ListenerModel listenerModel = new ListenerModel(); listenerModel.setType("Type"); listenerModel.setKind(ListenerModel.Kind.RULE_RUNTIME_EVENT_LISTENER); final HTMLElement selectContainer = mock(HTMLElement.class); final ListenerListItemPresenter result = listenerListItemPresenter.setup(listenerModel, mock(KnowledgeSessionListItemPresenter.class)); Assert.assertEquals(result, listenerListItemPresenter); verify(view).init(eq(listenerListItemPresenter)); verify(view).setType(eq("Type")); verify(view).setupKindSelect(eq(listenerModel), any()); }
@Override public ListenerListItemPresenter setup(final ListenerModel listenerModel, final KnowledgeSessionListItemPresenter parentPresenter) { this.model = listenerModel; this.parentPresenter = parentPresenter; view.init(this); view.setType(model.getType()); view.setupKindSelect(model, parentPresenter); return this; }
ListenerListItemPresenter extends ListItemPresenter<ListenerModel, KnowledgeSessionListItemPresenter, ListenerListItemPresenter.View> { @Override public ListenerListItemPresenter setup(final ListenerModel listenerModel, final KnowledgeSessionListItemPresenter parentPresenter) { this.model = listenerModel; this.parentPresenter = parentPresenter; view.init(this); view.setType(model.getType()); view.setupKindSelect(model, parentPresenter); return this; } }
ListenerListItemPresenter extends ListItemPresenter<ListenerModel, KnowledgeSessionListItemPresenter, ListenerListItemPresenter.View> { @Override public ListenerListItemPresenter setup(final ListenerModel listenerModel, final KnowledgeSessionListItemPresenter parentPresenter) { this.model = listenerModel; this.parentPresenter = parentPresenter; view.init(this); view.setType(model.getType()); view.setupKindSelect(model, parentPresenter); return this; } @Inject  ListenerListItemPresenter(final View view); }
ListenerListItemPresenter extends ListItemPresenter<ListenerModel, KnowledgeSessionListItemPresenter, ListenerListItemPresenter.View> { @Override public ListenerListItemPresenter setup(final ListenerModel listenerModel, final KnowledgeSessionListItemPresenter parentPresenter) { this.model = listenerModel; this.parentPresenter = parentPresenter; view.init(this); view.setType(model.getType()); view.setupKindSelect(model, parentPresenter); return this; } @Inject  ListenerListItemPresenter(final View view); @Override ListenerListItemPresenter setup(final ListenerModel listenerModel,
                                           final KnowledgeSessionListItemPresenter parentPresenter); void setType(final String type); @Override void remove(); @Override ListenerModel getObject(); }
ListenerListItemPresenter extends ListItemPresenter<ListenerModel, KnowledgeSessionListItemPresenter, ListenerListItemPresenter.View> { @Override public ListenerListItemPresenter setup(final ListenerModel listenerModel, final KnowledgeSessionListItemPresenter parentPresenter) { this.model = listenerModel; this.parentPresenter = parentPresenter; view.init(this); view.setType(model.getType()); view.setupKindSelect(model, parentPresenter); return this; } @Inject  ListenerListItemPresenter(final View view); @Override ListenerListItemPresenter setup(final ListenerModel listenerModel,
                                           final KnowledgeSessionListItemPresenter parentPresenter); void setType(final String type); @Override void remove(); @Override ListenerModel getObject();  }