org.springframework.cloud.service.UriBasedServiceInfo Java Examples

The following examples show how to use org.springframework.cloud.service.UriBasedServiceInfo. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CloudTestUtil.java    From spring-cloud-connectors with Apache License 2.0 5 votes vote down vote up
public static void assertBasicProps(String leadKey, UriBasedServiceInfo serviceInfo, Properties cloudProperties) {
	assertEquals(serviceInfo.getId(), cloudProperties.get(leadKey + ".id"));
	assertEquals(serviceInfo.getHost(), cloudProperties.get(leadKey + ".connection.host"));
	assertEquals(serviceInfo.getPort(), cloudProperties.get(leadKey + ".connection.port"));
	assertEquals(serviceInfo.getUserName(), cloudProperties.get(leadKey + ".connection.username"));
	assertEquals(serviceInfo.getPassword(), cloudProperties.get(leadKey + ".connection.password"));
}
 
Example #2
Source File: CloudTest.java    From spring-cloud-connectors with Apache License 2.0 5 votes vote down vote up
private void assertBasicProps(String leadKey, UriBasedServiceInfo serviceInfo, Properties cloudProperties) {
	assertEquals(serviceInfo.getId(), cloudProperties.get(leadKey + ".id"));

	assertEquals(serviceInfo.getUri(), cloudProperties.get(leadKey + ".connection.uri"));

	assertEquals(serviceInfo.getHost(), cloudProperties.get(leadKey + ".connection.host"));
	assertEquals(serviceInfo.getPort(), cloudProperties.get(leadKey + ".connection.port"));
	assertEquals(serviceInfo.getUserName(), cloudProperties.get(leadKey + ".connection.username"));
	assertEquals(serviceInfo.getPassword(), cloudProperties.get(leadKey + ".connection.password"));
}
 
Example #3
Source File: AbstractCloudFoundryConnectorTest.java    From spring-cloud-connectors with Apache License 2.0 5 votes vote down vote up
protected static void assertUriBasedServiceInfoFields(ServiceInfo serviceInfo,
													  String scheme, String host, int port,
													  String username, String password, String path) {
	assertThat(serviceInfo, instanceOf(UriBasedServiceInfo.class));

	UriBasedServiceInfo info = (UriBasedServiceInfo) serviceInfo;

	assertEquals(scheme, info.getScheme());
	assertEquals(host, info.getHost());
	assertEquals(port, info.getPort());
	assertEquals(username, info.getUserName());
	assertEquals(password, info.getPassword());
	assertEquals(path, info.getPath());
}
 
Example #4
Source File: RedisConnectionFactoryXmlConfigTest.java    From spring-cloud-connectors with Apache License 2.0 4 votes vote down vote up
protected UriBasedServiceInfo createService(String id) {
	return createRedisService(id);
}
 
Example #5
Source File: AbstractLocalConfigConnectorTest.java    From spring-cloud-connectors with Apache License 2.0 4 votes vote down vote up
protected static void assertUriParameters(UriBasedServiceInfo serviceInfo) {
	assertEquals(HOSTNAME, serviceInfo.getHost());
	assertEquals(PORT, serviceInfo.getPort());
	assertEquals(USERNAME, serviceInfo.getUserName());
	assertEquals(PASSWORD, serviceInfo.getPassword());
}