use of org.springframework.cloud.CloudTestUtil.StubApplicationInstanceInfo in project spring-cloud-connectors by spring-cloud.
the class StubServiceConnectorConfig method appProps.
@Test
public void appProps() {
Map<String, Object> appProps = new HashMap<String, Object>();
appProps.put("foo", "bar");
// on v2, users property is null
appProps.put("users", null);
StubCloudConnector stubCloudConnector = CloudTestUtil.getTestCloudConnector(new StubApplicationInstanceInfo("instance-id-1", "myapp", appProps));
Cloud testCloud = new Cloud(stubCloudConnector, serviceConnectorCreators);
assertEquals("myapp", testCloud.getCloudProperties().get("cloud.application.app-id"));
assertEquals("instance-id-1", testCloud.getCloudProperties().get("cloud.application.instance-id"));
assertEquals("bar", testCloud.getCloudProperties().get("cloud.application.foo"));
}
Aggregations