1616import static junit .framework .TestCase .assertEquals ;
1717import static junit .framework .TestCase .assertNotNull ;
1818
19+ import static java .lang .String .*;
20+
1921import androidx .test .InstrumentationRegistry ;
2022import androidx .test .core .app .ApplicationProvider ;
2123
@@ -149,6 +151,20 @@ public void test_AZURE_NA() throws Exception {
149151 config .setRegion (Config .ContentstackRegion .AZURE_NA );
150152 Context appContext = InstrumentationRegistry .getTargetContext ();
151153 stack = Contentstack .stack (appContext , DEFAULT_API_KEY , DEFAULT_DELIVERY_TOKEN , DEFAULT_ENV , config );
154+ assertEquals ("azure-na-cdn.contentstack.com" , config .getHost ());
155+ }
156+
157+ @ Test
158+ public void test_AU () throws Exception {
159+ Config config = new Config ();
160+ String DEFAULT_API_KEY = BuildConfig .APIKey ;
161+ String DEFAULT_DELIVERY_TOKEN = BuildConfig .deliveryToken ;
162+ String DEFAULT_ENV = BuildConfig .environment ;
163+ config .setRegion (Config .ContentstackRegion .AU );
164+ // Host will be set based on region
165+ Context appContext = InstrumentationRegistry .getTargetContext ();
166+ stack = Contentstack .stack (appContext , DEFAULT_API_KEY , DEFAULT_DELIVERY_TOKEN , DEFAULT_ENV , config );
167+ assertEquals ("au-cdn.contentstack.com" , config .getHost ());
152168 }
153169
154170 @ Test
@@ -162,6 +178,7 @@ public void test_GCP_NA() throws Exception {
162178 config .setRegion (Config .ContentstackRegion .GCP_NA );
163179 Context appContext = InstrumentationRegistry .getTargetContext ();
164180 stack = Contentstack .stack (appContext , DEFAULT_API_KEY , DEFAULT_DELIVERY_TOKEN , DEFAULT_ENV , config );
181+ assertEquals ("gcp-na-cdn.contentstack.com" , config .getHost ());
165182 }
166183
167184 @ Test
0 commit comments