List of usage examples for android.app Service onCreate
public void onCreate()
From source file:com.test.onesignal.MainOneSignalClassRunner.java
@Test public void shouldSyncPendingChangesFromSyncService() throws Exception { OneSignalInit();// ww w . j a va2 s . co m threadAndTaskWait(); OneSignal.sendTag("key", "value"); OneSignalPackagePrivateHelper.SyncService_onTaskRemoved(); OneSignalPackagePrivateHelper.resetRunnables(); threadAndTaskWait(); Assert.assertEquals(1, ShadowOneSignalRestClient.networkCallCount); StaticResetHelper.restSetStaticFields(); Service service = new SyncService(); service.onCreate(); threadAndTaskWait(); Assert.assertEquals("value", ShadowOneSignalRestClient.lastPost.getJSONObject("tags").getString("key")); }