Java 类android.support.test.espresso.core.deps.guava.base.Strings 实例源码
项目:redux-android-sample
文件:GifListActivityTest.java
@Test
public void whenDefaultGifsAreLoaded() {
try {
DB db = DBFactory.open(getTargetContext());
db.destroy();
} catch (Exception e) {
Log.e("TEST", e.getLocalizedMessage(), e);
}
mHelper.dispatchFakeAppState(ImmutableAppState.builder().build());
mHelper.replacePersistenceMiddleware(new DataManager(getTargetContext()));
GifActionCreator.getInstance().setDispatcher(mock(DispatcherImpl.class));
mActivityTestRule.launchActivity(new Intent());
Map<String, Gif> expectedGifs = getAppStateDefault().getGifs();
RecyclerTestLocker locker = new RecyclerTestLocker(getRecyclerView(), expectedGifs.size());
locker.waitForEspresso();
Map<Strings, Gif> gotGifs = ((GifsAdapter) getRecyclerView().getAdapter()).getGifs();
assertEquals(expectedGifs, gotGifs);
GifActionCreator.getInstance().setDispatcher(getFluxxan().getDispatcher());
}