use of com.netflix.appinfo.EurekaInstanceConfig in project riposte by Nike-Inc.
the class EurekaHandlerTest method createEurekaInstanceConfig_returns_MyDataCenterInstanceConfig_when_datacenterType_is_null_or_MyOwn_or_invalid.
@DataProvider(value = { "null", "MyOwn", "not-a-real-datacenter-type" })
@Test
public void createEurekaInstanceConfig_returns_MyDataCenterInstanceConfig_when_datacenterType_is_null_or_MyOwn_or_invalid(String datacenterType) {
// given
doReturn(datacenterType).when(datacenterTypePropertySupplierMock).get();
// when
EurekaInstanceConfig instanceConfig = handlerSpy.createEurekaInstanceConfig();
// then
assertThat(instanceConfig).isInstanceOf(MyDataCenterInstanceConfig.class);
assertThat(Whitebox.getInternalState(instanceConfig, "namespace")).isEqualTo(handlerSpy.eurekaClientNamespace);
}
Aggregations