@Test public void hasBeanIsCloudHasService() { makeCloudEnv(); String JSONString = addOneSolaceService("VCAP_SERVICES"); String CF_VCAP_SERVICES = "VCAP_SERVICES={ \"solace-pubsub\": [" + JSONString + "] }"; load(CF_CLOUD_APP_ENV, CF_VCAP_SERVICES); Environment env = context.getEnvironment(); String VCAP_APPLICATION = env.getProperty("VCAP_APPLICATION"); assertNotNull(VCAP_APPLICATION); assertEquals("{}", VCAP_APPLICATION); String VCAP_SERVICES = env.getProperty("VCAP_SERVICES"); assertNotNull(VCAP_SERVICES); assertTrue(VCAP_SERVICES.contains("solace-pubsub")); validateBackwardsCompatibility(); T bean = this.context.getBean(beanClass); assertNotNull(bean); if (beanClass.equals(SpringJCSMPFactoryCloudFactory.class)) { SpringJCSMPFactoryCloudFactory springJCSMPFactoryCloudFactory = (SpringJCSMPFactoryCloudFactory) bean; assertNotNull(springJCSMPFactoryCloudFactory.getSpringJCSMPFactory()); List<SolaceServiceCredentials> availableServices = springJCSMPFactoryCloudFactory.getSolaceServiceCredentials(); assertNotNull(availableServices); assertEquals(1,availableServices.size()); } else if (beanClass.equals(JCSMPProperties.class)) { new SpringJCSMPFactory((JCSMPProperties) bean); } }
@Override public List<SolaceServiceCredentials> getSolaceServiceCredentials() { return new ArrayList<SolaceServiceCredentials>(getSolaceMessagingInfos()); }
SolaceJavaAutoCloudConfiguration extends SolaceJavaAutoConfigurationBase { @Override public List<SolaceServiceCredentials> getSolaceServiceCredentials() { return new ArrayList<SolaceServiceCredentials>(getSolaceMessagingInfos()); } }
SolaceJavaAutoCloudConfiguration extends SolaceJavaAutoConfigurationBase { @Override public List<SolaceServiceCredentials> getSolaceServiceCredentials() { return new ArrayList<SolaceServiceCredentials>(getSolaceMessagingInfos()); } @Autowired  SolaceJavaAutoCloudConfiguration(SolaceJavaProperties properties); }
SolaceJavaAutoCloudConfiguration extends SolaceJavaAutoConfigurationBase { @Override public List<SolaceServiceCredentials> getSolaceServiceCredentials() { return new ArrayList<SolaceServiceCredentials>(getSolaceMessagingInfos()); } @Autowired  SolaceJavaAutoCloudConfiguration(SolaceJavaProperties properties); @Override List<SolaceServiceCredentials> getSolaceServiceCredentials(); @Deprecated @Override List<SolaceMessagingInfo> getSolaceMessagingInfos(); @Deprecated @Bean @Primary SolaceMessagingInfo findFirstSolaceMessagingInfo(); }
SolaceJavaAutoCloudConfiguration extends SolaceJavaAutoConfigurationBase { @Override public List<SolaceServiceCredentials> getSolaceServiceCredentials() { return new ArrayList<SolaceServiceCredentials>(getSolaceMessagingInfos()); } @Autowired  SolaceJavaAutoCloudConfiguration(SolaceJavaProperties properties); @Override List<SolaceServiceCredentials> getSolaceServiceCredentials(); @Deprecated @Override List<SolaceMessagingInfo> getSolaceMessagingInfos(); @Deprecated @Bean @Primary SolaceMessagingInfo findFirstSolaceMessagingInfo();  }