Prueba de espresso para la notificación de aparecer
Quiero probar que cuando recibo push, se mostrará una notificación. Y podría ser mejor verificar sus propiedades (como título, establecer intención, etc.)
¿Como lo puedo hacer?
@Before
public void setupTest() {
mData.putString(PushNotificator.KEY_PUSH_TYPE, PushType.PROJECT_OFFER.toString());
mData.putString(PushNotificator.KEY_PUSH_OBJECT, pushObjectJsonString);
mContext = InstrumentationRegistry.getContext();
}
@Test
public void projectOfferCreatedFromBundle() {
mPushNotificator = new PushNotificator(mContext);
mPushNotificator.processPush(mData);
onView(withText("111")).check(matches(withText("111"))); //how to find notification?
}