urbanairship-core/src/test/java/com/urbanairship/AirshipConfigOptionsTest.java
@Test
    public void testLoadFromProperties() throws IOException {
        AirshipConfigOptions aco = new AirshipConfigOptions.Builder().applyProperties(uaContext, getProperties(TEST_PROPERTIES_FILE)).build();

        assertEquals("prodAppKey", aco.productionAppKey);
        assertEquals("prodAppSecret", aco.productionAppSecret);
        assertEquals("devAppKey", aco.developmentAppKey);
        assertEquals("devAppSecret", aco.developmentAppSecret);
        assertEquals("https://test.host.url.com/", aco.hostURL);
        assertEquals("https://test.analytics.url.com/", aco.analyticsServer);
        assertEquals("https://test.landingpage.url.com/", aco.landingPageContentURL);
        assertEquals("id", aco.gcmSender);
        assertArrayEquals(new String[] { "GCM_TRANSPORT" }, aco.allowedTransports);
        assertEquals("https://first.whitelist.url.com/", aco.whitelist[0]);
        assertEquals("https://second.whitelist.url.com/", aco.whitelist[1]);
        assertTrue(aco.inProduction);
        assertFalse(aco.analyticsEnabled);
        assertEquals(2700, aco.backgroundReportingIntervalMS);
        assertTrue(aco.clearNamedUser);
        assertEquals(Log.VERBOSE, aco.developmentLogLevel);
        assertEquals(Log.VERBOSE, aco.productionLogLevel);
        assertFalse(aco.autoLaunchApplication);
        assertTrue(aco.channelCreationDelayEnabled);
        assertFalse(aco.channelCaptureEnabled);
        assertEquals(aco.productionAppKey, aco.getAppKey());
        assertEquals(aco.productionAppSecret, aco.getAppSecret());
        assertEquals(Log.VERBOSE, aco.getLoggerLevel());
        assertEquals(R.drawable.ua_ic_urbanairship_notification, aco.notificationIcon);
        assertEquals(Color.parseColor("#ff0000"), aco.notificationAccentColor);
        assertEquals("https://test.wallet.url.com/", aco.walletUrl);
        assertEquals("test_channel", aco.notificationChannel);
        assertEquals("https://play.google.com/store/apps/topic?id=editors_choice", aco.appStoreUri.toString());


    }
/**
     * This test verifies the applyProperties method can parse different types
     */
This test verifies the applyProperties method can parse different types
This test verifies the applyProperties method can parse different types
@Test
    public void testLoadFromProperties() throws IOException {
        AirshipConfigOptions aco = new AirshipConfigOptions.Builder().applyProperties(uaContext, getProperties(TEST_PROPERTIES_FILE)).build();
        assertEquals("prodAppKey", aco.productionAppKey);
        assertEquals("prodAppSecret", aco.productionAppSecret);
        assertEquals("devAppKey", aco.developmentAppKey);
        assertEquals("devAppSecret", aco.developmentAppSecret);
        assertEquals("https://test.host.url.com/", aco.hostURL);
        assertEquals("https://test.analytics.url.com/", aco.analyticsServer);
        assertEquals("https://test.landingpage.url.com/", aco.landingPageContentURL);
        assertEquals("id", aco.gcmSender);
        assertArrayEquals(new String[] { "GCM_TRANSPORT" }, aco.allowedTransports);
        assertEquals("https://first.whitelist.url.com/", aco.whitelist[0]);
        assertEquals("https://second.whitelist.url.com/", aco.whitelist[1]);
        assertTrue(aco.inProduction);
        assertFalse(aco.analyticsEnabled);
        assertEquals(2700, aco.backgroundReportingIntervalMS);
        assertTrue(aco.clearNamedUser);
        assertEquals(Log.VERBOSE, aco.developmentLogLevel);
        assertEquals(Log.VERBOSE, aco.productionLogLevel);
        assertFalse(aco.autoLaunchApplication);
        assertTrue(aco.channelCreationDelayEnabled);
        assertFalse(aco.channelCaptureEnabled);
        assertEquals(aco.productionAppKey, aco.getAppKey());
        assertEquals(aco.productionAppSecret, aco.getAppSecret());
        assertEquals(Log.VERBOSE, aco.getLoggerLevel());
        assertEquals(R.drawable.ua_ic_urbanairship_notification, aco.notificationIcon);
        assertEquals(Color.parseColor("#ff0000"), aco.notificationAccentColor);
        assertEquals("https://test.wallet.url.com/", aco.walletUrl);
        assertEquals("test_channel", aco.notificationChannel);
        assertEquals("https://play.google.com/store/apps/topic?id=editors_choice", aco.appStoreUri.toString());
    }
@ Test public void testLoadFromProperties ( ) throws IOException { AirshipConfigOptions aco = new AirshipConfigOptions . Builder ( ) . applyProperties ( uaContext , getProperties ( TEST_PROPERTIES_FILE ) ) . build ( ) ; assertEquals ( "prodAppKey" , aco . productionAppKey ) ; assertEquals ( "prodAppSecret" , aco . productionAppSecret ) ; assertEquals ( "devAppKey" , aco . developmentAppKey ) ; assertEquals ( "devAppSecret" , aco . developmentAppSecret ) ; assertEquals ( "https://test.host.url.com/" , aco . hostURL ) ; assertEquals ( "https://test.analytics.url.com/" , aco . analyticsServer ) ; assertEquals ( "https://test.landingpage.url.com/" , aco . landingPageContentURL ) ; assertEquals ( "id" , aco . gcmSender ) ; assertArrayEquals ( new String [ ] { "GCM_TRANSPORT" } , aco . allowedTransports ) ; assertEquals ( "https://first.whitelist.url.com/" , aco . whitelist [ 0 ] ) ; assertEquals ( "https://second.whitelist.url.com/" , aco . whitelist [ 1 ] ) ; assertTrue ( aco . inProduction ) ; assertFalse ( aco . analyticsEnabled ) ; assertEquals ( 2700 , aco . backgroundReportingIntervalMS ) ; assertTrue ( aco . clearNamedUser ) ; assertEquals ( Log . VERBOSE , aco . developmentLogLevel ) ; assertEquals ( Log . VERBOSE , aco . productionLogLevel ) ; assertFalse ( aco . autoLaunchApplication ) ; assertTrue ( aco . channelCreationDelayEnabled ) ; assertFalse ( aco . channelCaptureEnabled ) ; assertEquals ( aco . productionAppKey , aco . getAppKey ( ) ) ; assertEquals ( aco . productionAppSecret , aco . getAppSecret ( ) ) ; assertEquals ( Log . VERBOSE , aco . getLoggerLevel ( ) ) ; assertEquals ( R . drawable . ua_ic_urbanairship_notification , aco . notificationIcon ) ; assertEquals ( Color . parseColor ( "#ff0000" ) , aco . notificationAccentColor ) ; assertEquals ( "https://test.wallet.url.com/" , aco . walletUrl ) ; assertEquals ( "test_channel" , aco . notificationChannel ) ; assertEquals ( "https://play.google.com/store/apps/topic?id=editors_choice" , aco . appStoreUri . toString ( ) ) ; }
This test verifies the applyProperties method can parse different types
This test verifies the applyProperties method can parse different types