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

        pushManager.setPushEnabled(true);
        pushManager.setRegistrationToken(null);

        assertEquals("OptIn should be false", false, pushManager.isOptIn());
    }
/**
     * Test OptIn is false when GCM Id is null
     */
Test OptIn is false when GCM Id is null
Test OptIn is false when GCM Id is null
@Test
    public void testOptInGCMIdNull() {
        TestApplication.getApplication().setPlatform(UAirship.ANDROID_PLATFORM);
        pushManager.setPushEnabled(true);
        pushManager.setRegistrationToken(null);
        assertEquals("OptIn should be false", false, pushManager.isOptIn());
    }
@ Test public void testOptInGCMIdNull ( ) { TestApplication . getApplication ( ) . setPlatform ( UAirship . ANDROID_PLATFORM ) ; pushManager . setPushEnabled ( true ) ; pushManager . setRegistrationToken ( null ) ; assertEquals ( "OptIn should be false" , false , pushManager . isOptIn ( ) ) ; }
Test OptIn is false when GCM Id is null
Test OptIn is false when GCM Id is null