into which the activity should place its contents. */ ViewGroup bind(AppCompatActivity activity); /** * Returns the drawerLayout of this window. * */ DrawerLayout getDrawerLayout(); }
Presenter: Test that view events invoke the right model method. mock both View and Model. Model: Test the business logic, mock the data source and Presenter.
public void putPresenter(Class c, Presenter p) { presenterHolder.put(c, p); } public <T extends Presenter> T getPresenter(Class<T> c) { return (T) presenterHolder.get(c); } public void remove(Class c) { presenterMap.remove(c); } }