urbanairship-core/src/test/java/com/urbanairship/push/IncomingPushRunnableTest.java
@Test
    public void testInQuietTime() {
        when(pushManager.isComponentEnabled()).thenReturn(true);
        when(pushManager.isPushEnabled()).thenReturn(true);
        when(pushManager.isOptIn()).thenReturn(true);
        when(pushManager.isUniqueCanonicalId("testPushID")).thenReturn(true);

        when(pushManager.isVibrateEnabled()).thenReturn(true);
        when(pushManager.isSoundEnabled()).thenReturn(true);
        when(pushManager.isInQuietTime()).thenReturn(true);

        pushRunnable.run();

        assertNull("The notification sound should be null.", notification.sound);
        assertEquals("The notification defaults should not include vibrate or sound.", 0, notification.defaults);
    }
/**
     * Test the notification defaults in quiet time.
     */
Test the notification defaults in quiet time.
Test the notification defaults in quiet time .
@Test
    public void testInQuietTime() {
        when(pushManager.isComponentEnabled()).thenReturn(true);
        when(pushManager.isPushEnabled()).thenReturn(true);
        when(pushManager.isOptIn()).thenReturn(true);
        when(pushManager.isUniqueCanonicalId("testPushID")).thenReturn(true);
        when(pushManager.isVibrateEnabled()).thenReturn(true);
        when(pushManager.isSoundEnabled()).thenReturn(true);
        when(pushManager.isInQuietTime()).thenReturn(true);
        pushRunnable.run();
        assertNull("The notification sound should be null.", notification.sound);
        assertEquals("The notification defaults should not include vibrate or sound.", 0, notification.defaults);
    }
@ Test public void testInQuietTime ( ) { when ( pushManager . isComponentEnabled ( ) ) . thenReturn ( true ) ; when ( pushManager . isPushEnabled ( ) ) . thenReturn ( true ) ; when ( pushManager . isOptIn ( ) ) . thenReturn ( true ) ; when ( pushManager . isUniqueCanonicalId ( "testPushID" ) ) . thenReturn ( true ) ; when ( pushManager . isVibrateEnabled ( ) ) . thenReturn ( true ) ; when ( pushManager . isSoundEnabled ( ) ) . thenReturn ( true ) ; when ( pushManager . isInQuietTime ( ) ) . thenReturn ( true ) ; pushRunnable . run ( ) ; assertNull ( "The notification sound should be null." , notification . sound ) ; assertEquals ( "The notification defaults should not include vibrate or sound." , 0 , notification . defaults ) ; }
Test the notification defaults in quiet time.
Test the notification defaults in quiet time .