33
33
34
34
import com .google .api .gax .rpc .mtls .MtlsProvider ;
35
35
import com .google .api .gax .rpc .testing .FakeMtlsProvider ;
36
+ import com .google .auth .Credentials ;
36
37
import com .google .common .truth .Truth ;
37
38
import java .io .IOException ;
38
39
import org .junit .Before ;
@@ -51,7 +52,7 @@ public void setUp() throws IOException {
51
52
defaultEndpointContextBuilder =
52
53
EndpointContext .newBuilder ()
53
54
.setServiceName ("test" )
54
- .setUniverseDomain (EndpointContext .GOOGLE_DEFAULT_UNIVERSE )
55
+ .setUniverseDomain (Credentials .GOOGLE_DEFAULT_UNIVERSE )
55
56
.setClientSettingsEndpoint (DEFAULT_ENDPOINT )
56
57
.setMtlsEndpoint (DEFAULT_MTLS_ENDPOINT );
57
58
}
@@ -177,7 +178,7 @@ public void endpointContextBuild_noUniverseDomain_usesClientSettingsEndpoint()
177
178
defaultEndpointContextBuilder .setClientSettingsEndpoint (DEFAULT_ENDPOINT ).build ();
178
179
Truth .assertThat (endpointContext .resolvedEndpoint ()).isEqualTo (DEFAULT_ENDPOINT );
179
180
Truth .assertThat (endpointContext .resolvedUniverseDomain ())
180
- .isEqualTo (EndpointContext .GOOGLE_DEFAULT_UNIVERSE );
181
+ .isEqualTo (Credentials .GOOGLE_DEFAULT_UNIVERSE );
181
182
}
182
183
183
184
@ Test
@@ -192,7 +193,7 @@ public void endpointContextBuild_noUniverseDomain_usesTransportChannelProviderEn
192
193
Truth .assertThat (endpointContext .resolvedEndpoint ())
193
194
.isEqualTo (transportChannelProviderEndpoint );
194
195
Truth .assertThat (endpointContext .resolvedUniverseDomain ())
195
- .isEqualTo (EndpointContext .GOOGLE_DEFAULT_UNIVERSE );
196
+ .isEqualTo (Credentials .GOOGLE_DEFAULT_UNIVERSE );
196
197
}
197
198
198
199
@ Test
@@ -207,7 +208,7 @@ public void endpointContextBuild_noUniverseDomain_overrideUsesTransportChannelPr
207
208
Truth .assertThat (endpointContext .resolvedEndpoint ())
208
209
.isEqualTo (transportChannelProviderEndpoint );
209
210
Truth .assertThat (endpointContext .resolvedUniverseDomain ())
210
- .isEqualTo (EndpointContext .GOOGLE_DEFAULT_UNIVERSE );
211
+ .isEqualTo (Credentials .GOOGLE_DEFAULT_UNIVERSE );
211
212
}
212
213
213
214
@ Test
@@ -225,7 +226,7 @@ public void endpointContextBuild_GDUUniverseDomain() throws IOException {
225
226
EndpointContext endpointContext = defaultEndpointContextBuilder .build ();
226
227
Truth .assertThat (endpointContext .resolvedEndpoint ()).isEqualTo (DEFAULT_ENDPOINT );
227
228
Truth .assertThat (endpointContext .resolvedUniverseDomain ())
228
- .isEqualTo (EndpointContext .GOOGLE_DEFAULT_UNIVERSE );
229
+ .isEqualTo (Credentials .GOOGLE_DEFAULT_UNIVERSE );
229
230
}
230
231
231
232
@ Test
@@ -248,7 +249,7 @@ public void endpointContextBuild_noUniverseDomain_noEndpoints() throws IOExcepti
248
249
.build ();
249
250
Truth .assertThat (endpointContext .resolvedEndpoint ()).isEqualTo (expectedEndpoint );
250
251
Truth .assertThat (endpointContext .resolvedUniverseDomain ())
251
- .isEqualTo (EndpointContext .GOOGLE_DEFAULT_UNIVERSE );
252
+ .isEqualTo (Credentials .GOOGLE_DEFAULT_UNIVERSE );
252
253
}
253
254
254
255
@ Test
@@ -269,7 +270,7 @@ public void endpointContextBuild_mtlsConfigured_GDU() throws IOException {
269
270
.build ();
270
271
Truth .assertThat (endpointContext .resolvedEndpoint ()).isEqualTo (DEFAULT_MTLS_ENDPOINT );
271
272
Truth .assertThat (endpointContext .resolvedUniverseDomain ())
272
- .isEqualTo (EndpointContext .GOOGLE_DEFAULT_UNIVERSE );
273
+ .isEqualTo (Credentials .GOOGLE_DEFAULT_UNIVERSE );
273
274
}
274
275
275
276
@ Test
@@ -315,7 +316,7 @@ public void endpointContextBuild_gdchFlow_noUniverseDomain_noCustomEndpoint() th
315
316
.build ();
316
317
Truth .assertThat (endpointContext .resolvedEndpoint ()).isEqualTo (DEFAULT_ENDPOINT );
317
318
Truth .assertThat (endpointContext .resolvedUniverseDomain ())
318
- .isEqualTo (EndpointContext .GOOGLE_DEFAULT_UNIVERSE );
319
+ .isEqualTo (Credentials .GOOGLE_DEFAULT_UNIVERSE );
319
320
}
320
321
321
322
@ Test
@@ -329,6 +330,6 @@ public void endpointContextBuild_gdchFlow_noUniverseDomain_customEndpoint() thro
329
330
.build ();
330
331
Truth .assertThat (endpointContext .resolvedEndpoint ()).isEqualTo (clientSettingsEndpoint );
331
332
Truth .assertThat (endpointContext .resolvedUniverseDomain ())
332
- .isEqualTo (EndpointContext .GOOGLE_DEFAULT_UNIVERSE );
333
+ .isEqualTo (Credentials .GOOGLE_DEFAULT_UNIVERSE );
333
334
}
334
335
}
0 commit comments