urbanairship-core/src/test/java/com/urbanairship/push/PushManagerTest.java
@Test
    public void testPushTokenRegistrationDisabled() {
        TestApplication.getApplication().setPlatform(UAirship.ANDROID_PLATFORM);

        pushManager.setPushTokenRegistrationEnabled(false);
        pushManager.setRegistrationToken("fakeGcmToken");

        assertFalse(pushManager.getPushTokenRegistrationEnabled());
        assertFalse(pushManager.isPushAvailable());
    }
/**
     * Test isPushAvailable does not call getGcmToken when pushTokenRegistrationEnabled is false.
     */
Test isPushAvailable does not call getGcmToken when pushTokenRegistrationEnabled is false.
Test isPushAvailable does not call getGcmToken when pushTokenRegistrationEnabled is false .
@Test
    public void testPushTokenRegistrationDisabled() {
        TestApplication.getApplication().setPlatform(UAirship.ANDROID_PLATFORM);
        pushManager.setPushTokenRegistrationEnabled(false);
        pushManager.setRegistrationToken("fakeGcmToken");
        assertFalse(pushManager.getPushTokenRegistrationEnabled());
        assertFalse(pushManager.isPushAvailable());
    }
@ Test public void testPushTokenRegistrationDisabled ( ) { TestApplication . getApplication ( ) . setPlatform ( UAirship . ANDROID_PLATFORM ) ; pushManager . setPushTokenRegistrationEnabled ( false ) ; pushManager . setRegistrationToken ( "fakeGcmToken" ) ; assertFalse ( pushManager . getPushTokenRegistrationEnabled ( ) ) ; assertFalse ( pushManager . isPushAvailable ( ) ) ; }
Test isPushAvailable does not call getGcmToken when pushTokenRegistrationEnabled is false.
Test isPushAvailable does not call getGcmToken when pushTokenRegistrationEnabled is false .