use of io.github.hidroh.materialistic.test.TestFavoriteActivity in project materialistic by hidroh.
the class FavoriteActivityTest method testSaveState.
@Test
public void testSaveState() {
Bundle outState = new Bundle();
controller.saveInstanceState(outState);
ActivityController<TestFavoriteActivity> controller = Robolectric.buildActivity(TestFavoriteActivity.class).create(outState).postCreate(outState).start().resume().visible();
assertEquals(2, ((RecyclerView) controller.get().findViewById(R.id.recycler_view)).getAdapter().getItemCount());
controller.pause().stop().destroy();
reset(keyDelegate);
}
Aggregations