Search in sources :

Example 1 with SimpleInjectedView

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());
}
Also used : SimpleInjectedView(com.mvp4g.rebind.test_tools.annotation.views.SimpleInjectedView) SimplePresenter01(com.mvp4g.rebind.test_tools.annotation.presenters.SimplePresenter01) Test(org.junit.Test)

Aggregations

SimplePresenter01 (com.mvp4g.rebind.test_tools.annotation.presenters.SimplePresenter01)1 SimpleInjectedView (com.mvp4g.rebind.test_tools.annotation.views.SimpleInjectedView)1 Test (org.junit.Test)1