use of org.springframework.cloud.CloudTestUtil.StubCompositeServiceInfo in project spring-cloud-connectors by spring-cloud.
the class StubServiceConnectorConfig method compositeServiceInfoRecursive.
@Test
public void compositeServiceInfoRecursive() {
StubServiceInfo testServiceInfo1a = new StubServiceInfo("test-id-1a", "test-host", 1000, "test-username", "test-password");
StubServiceInfo testServiceInfo1b = new StubServiceInfo("test-id-1b", "test-host", 1000, "test-username", "test-password");
ServiceInfo testCompositeServiceInfo1 = new StubCompositeServiceInfo("test-composite-1", testServiceInfo1a, testServiceInfo1b);
StubServiceInfo testServiceInfo2a = new StubServiceInfo("test-id-2a", "test-host", 1000, "test-username", "test-password");
StubServiceInfo testServiceInfo2b = new StubServiceInfo("test-id-2b", "test-host", 1000, "test-username", "test-password");
ServiceInfo testCompositeServiceInfo2 = new StubCompositeServiceInfo("test-composite-2", testServiceInfo2a, testServiceInfo2b);
ServiceInfo testCompositeServiceInfo = new StubCompositeServiceInfo("test-composite", testCompositeServiceInfo1, testCompositeServiceInfo2);
StubCloudConnector stubCloudConnector = CloudTestUtil.getTestCloudConnector(testCompositeServiceInfo);
Cloud testCloud = new Cloud(stubCloudConnector, serviceConnectorCreators);
assertNotNull(testCloud.getServiceInfo("test-id-1a"));
assertNotNull(testCloud.getServiceInfo("test-id-1b"));
assertNotNull(testCloud.getServiceInfo("test-id-2a"));
assertNotNull(testCloud.getServiceInfo("test-id-2b"));
}
use of org.springframework.cloud.CloudTestUtil.StubCompositeServiceInfo in project spring-cloud-connectors by spring-cloud.
the class StubServiceConnectorConfig method compositeServiceInfo.
@Test
public void compositeServiceInfo() {
StubServiceInfo testServiceInfo1 = new StubServiceInfo("test-id-1", "test-host", 1000, "test-username", "test-password");
StubServiceInfo testServiceInfo2 = new StubServiceInfo("test-id-2", "test-host", 1000, "test-username", "test-password");
ServiceInfo testCompositeServiceInfo = new StubCompositeServiceInfo("test-composite", testServiceInfo1, testServiceInfo2);
StubCloudConnector stubCloudConnector = CloudTestUtil.getTestCloudConnector(testCompositeServiceInfo);
Cloud testCloud = new Cloud(stubCloudConnector, serviceConnectorCreators);
assertNotNull(testCloud.getServiceInfo("test-id-1"));
assertNotNull(testCloud.getServiceInfo("test-id-2"));
}
Aggregations