@@ -51,7 +51,7 @@ public void testBuildWithOkHttpClient() throws Exception {
5151 OkHttpClient .Builder builder = new OkHttpClient .Builder ();
5252 //make request to a url pointing to our fake server
5353 String serverUrl = server .url ("" ).toString ();
54- Retrofit retrofit = new RetrofitClient ().build (serverUrl , builder );
54+ Retrofit retrofit = new RetrofitClient (true ).build (serverUrl , builder );
5555 CallTestService callTestService = retrofit .create (CallTestService .class );
5656 JsonElement jsonElementReturnedFromServer = callTestService .getAccessToken ().execute ().body ();
5757 // Grab the request recieved
@@ -74,7 +74,7 @@ public void testBuildWithOkHttpClient() throws Exception {
7474 public void testBuildWithInterceptor () throws Exception {
7575 //make request to our fake server
7676 String serverUrl = server .url ("" ).toString ();
77- Retrofit retrofit = new RetrofitClient ().build (serverUrl , HttpLoggingInterceptor .Level .BODY );
77+ Retrofit retrofit = new RetrofitClient (true ).build (serverUrl , HttpLoggingInterceptor .Level .BODY );
7878 CallTestService callTestService = retrofit .create (CallTestService .class );
7979 JsonElement jsonElementReturnedFromServer = callTestService .getAccessToken ().execute ().body ();
8080 RecordedRequest request1 = server .takeRequest ();
@@ -99,7 +99,7 @@ public void testBuildWithParams() throws Exception {
9999 params .put ("Key1" , "value1" );
100100 //make request to our fake server
101101 String serverUrl = server .url ("" ).toString ();
102- Retrofit retrofit = new RetrofitClient ().build (serverUrl , params );
102+ Retrofit retrofit = new RetrofitClient (true ).build (serverUrl , params );
103103 CallTestService callTestService = retrofit .create (CallTestService .class );
104104 JsonElement jsonElementReturnedFromServer = callTestService .getAccessToken ().execute ().body ();
105105 RecordedRequest request1 = server .takeRequest ();
@@ -124,7 +124,7 @@ public void testBuildWithParams() throws Exception {
124124 @ Test
125125 public void testBuildWithUrlOnly () {
126126 String expected = "http://testurl.com/" ;
127- Retrofit retrofit = new RetrofitClient ().build (expected );
127+ Retrofit retrofit = new RetrofitClient (true ).build (expected );
128128 String actual = retrofit .baseUrl ().toString ();
129129 assertEquals (expected , actual );
130130 }
@@ -138,12 +138,12 @@ public interface CallTestService {
138138
139139 @ Test
140140 public void testGetBasicRetrofitBuilder () throws Exception {
141- assertEquals (true , (new RetrofitClient ().getBasicRetrofitBuilder () != null ));
141+ assertEquals (true , (new RetrofitClient (true ).getBasicRetrofitBuilder () != null ));
142142 }
143143
144144 @ Test
145145 public void testGetBasicHttpClientBuilder () throws Exception {
146- assertEquals (true , (new RetrofitClient ().getBasicHttpClientBuilder () != null ));
146+ assertEquals (true , (new RetrofitClient (true ).getBasicHttpClientBuilder () != null ));
147147 }
148148
149149}
0 commit comments