urbanairship-core/src/test/java/com/urbanairship/push/PushManagerTest.java
@Test
    public void testMigrateQuietTimeEnabled() {
        // Make sure only the old enable setting is set to true
        preferenceDataStore.remove(PushManager.QUIET_TIME_ENABLED);
        preferenceDataStore.put(PushManager.OLD_QUIET_TIME_ENABLED, true);

        // Verify quiet time is disabled
        assertFalse(pushManager.isQuietTimeEnabled());

        // Migrate the old setting
        pushManager.migrateQuietTimeSettings();

        // Verify quiet time is enabled
        assertTrue(pushManager.isQuietTimeEnabled());

        // Make sure changes to the setting are persisted
        pushManager.setQuietTimeEnabled(false);
        pushManager.migratePushEnabledSettings();
        assertFalse(pushManager.isQuietTimeEnabled());
    }
/**
     * Test migrating quiet time enabled setting.
     */
Test migrating quiet time enabled setting.
Test migrating quiet time enabled setting .
@Test
    public void testMigrateQuietTimeEnabled() {
        preferenceDataStore.remove(PushManager.QUIET_TIME_ENABLED);
        preferenceDataStore.put(PushManager.OLD_QUIET_TIME_ENABLED, true);
        assertFalse(pushManager.isQuietTimeEnabled());
        pushManager.migrateQuietTimeSettings();
        assertTrue(pushManager.isQuietTimeEnabled());
        pushManager.setQuietTimeEnabled(false);
        pushManager.migratePushEnabledSettings();
        assertFalse(pushManager.isQuietTimeEnabled());
    }
@ Test public void testMigrateQuietTimeEnabled ( ) { preferenceDataStore . remove ( PushManager . QUIET_TIME_ENABLED ) ; preferenceDataStore . put ( PushManager . OLD_QUIET_TIME_ENABLED , true ) ; assertFalse ( pushManager . isQuietTimeEnabled ( ) ) ; pushManager . migrateQuietTimeSettings ( ) ; assertTrue ( pushManager . isQuietTimeEnabled ( ) ) ; pushManager . setQuietTimeEnabled ( false ) ; pushManager . migratePushEnabledSettings ( ) ; assertFalse ( pushManager . isQuietTimeEnabled ( ) ) ; }
Test migrating quiet time enabled setting.
Test migrating quiet time enabled setting .
// Make sure only the old enable setting is set to true // Verify quiet time is disabled // Migrate the old setting // Verify quiet time is enabled // Make sure changes to the setting are persisted