urbanairship-core/src/test/java/com/urbanairship/js/WhitelistTest.java
@Test
    public void testHost() {
        assertTrue(whitelist.addEntry("http://www.urbanairship.com", Whitelist.SCOPE_ALL));
        assertTrue(whitelist.addEntry("http://oh.hi.marc", Whitelist.SCOPE_ALL));

        // Reject
        assertFalse(whitelist.isWhitelisted("http://oh.bye.marc", Whitelist.SCOPE_ALL));
        assertFalse(whitelist.isWhitelisted("http://www.urbanairship.com.hackers.io", Whitelist.SCOPE_ALL));
        assertFalse(whitelist.isWhitelisted("http://omg.www.urbanairship.com.hackers.io", Whitelist.SCOPE_ALL));

        // Accept
        assertTrue(whitelist.isWhitelisted("http://www.urbanairship.com", Whitelist.SCOPE_ALL));
        assertTrue(whitelist.isWhitelisted("http://oh.hi.marc", Whitelist.SCOPE_ALL));
    }
/**
     * Test host matching actually works.
     */
Test host matching actually works.
Test host matching actually works .
@Test
    public void testHost() {
        assertTrue(whitelist.addEntry("http://www.urbanairship.com", Whitelist.SCOPE_ALL));
        assertTrue(whitelist.addEntry("http://oh.hi.marc", Whitelist.SCOPE_ALL));
        assertFalse(whitelist.isWhitelisted("http://oh.bye.marc", Whitelist.SCOPE_ALL));
        assertFalse(whitelist.isWhitelisted("http://www.urbanairship.com.hackers.io", Whitelist.SCOPE_ALL));
        assertFalse(whitelist.isWhitelisted("http://omg.www.urbanairship.com.hackers.io", Whitelist.SCOPE_ALL));
        assertTrue(whitelist.isWhitelisted("http://www.urbanairship.com", Whitelist.SCOPE_ALL));
        assertTrue(whitelist.isWhitelisted("http://oh.hi.marc", Whitelist.SCOPE_ALL));
    }
@ Test public void testHost ( ) { assertTrue ( whitelist . addEntry ( "http://www.urbanairship.com" , Whitelist . SCOPE_ALL ) ) ; assertTrue ( whitelist . addEntry ( "http://oh.hi.marc" , Whitelist . SCOPE_ALL ) ) ; assertFalse ( whitelist . isWhitelisted ( "http://oh.bye.marc" , Whitelist . SCOPE_ALL ) ) ; assertFalse ( whitelist . isWhitelisted ( "http://www.urbanairship.com.hackers.io" , Whitelist . SCOPE_ALL ) ) ; assertFalse ( whitelist . isWhitelisted ( "http://omg.www.urbanairship.com.hackers.io" , Whitelist . SCOPE_ALL ) ) ; assertTrue ( whitelist . isWhitelisted ( "http://www.urbanairship.com" , Whitelist . SCOPE_ALL ) ) ; assertTrue ( whitelist . isWhitelisted ( "http://oh.hi.marc" , Whitelist . SCOPE_ALL ) ) ; }
Test host matching actually works.
Test host matching actually works .
// Reject // Accept