use of com.mvp4g.rebind.test_tools.annotation.views.SimpleInjectedView in project mvp4g by mvp4g.
the class BaseEventBusTest method testSetPresenter.
@Test
public void testSetPresenter() {
SimplePresenter01 presenter = new SimplePresenter01();
SimpleInjectedView view = new SimpleInjectedView();
SimplePresenter01 presenter2 = BaseEventBus.setPresenter(false, presenter, view, bus);
assertSame(presenter, presenter2);
assertSame(presenter.getEventBus(), bus);
assertSame(presenter.getView(), view);
presenter = new SimplePresenter01();
view = new SimpleInjectedView();
presenter2 = BaseEventBus.setPresenter(true, presenter, view, bus);
assertSame(presenter, presenter2);
assertSame(presenter.getEventBus(), bus);
assertSame(presenter.getView(), view);
assertSame(presenter, view.getPresenter());
}
Aggregations