@Test public void indicatorExists() { this.context = new AnnotationConfigApplicationContext( PropertyPlaceholderAutoConfiguration.class, MongoAutoConfiguration.class, MongoDataAutoConfiguration.class, EndpointAutoConfiguration.class, HealthIndicatorAutoConfiguration.class); assertThat(this.context.getBeanNamesForType(MongoTemplate.class).length) .isEqualTo(1); MongoHealthIndicator healthIndicator = this.context .getBean(MongoHealthIndicator.class); assertThat(healthIndicator).isNotNull(); }
@Test public void indicatorExists() { this.context = new AnnotationConfigApplicationContext( PropertyPlaceholderAutoConfiguration.class, RabbitAutoConfiguration.class, EndpointAutoConfiguration.class, HealthIndicatorAutoConfiguration.class); assertThat(this.context.getBeanNamesForType(RabbitAdmin.class).length) .isEqualTo(1); RabbitHealthIndicator healthIndicator = this.context .getBean(RabbitHealthIndicator.class); assertThat(healthIndicator).isNotNull(); }
@Test public void indicatorExists() { this.context = new AnnotationConfigApplicationContext( PropertyPlaceholderAutoConfiguration.class, SolrAutoConfiguration.class, EndpointAutoConfiguration.class, HealthIndicatorAutoConfiguration.class); assertThat(this.context.getBeanNamesForType(SolrClient.class).length) .isEqualTo(1); SolrHealthIndicator healthIndicator = this.context .getBean(SolrHealthIndicator.class); assertThat(healthIndicator).isNotNull(); }
@Test public void indicatorExists() { this.context = new AnnotationConfigApplicationContext( PropertyPlaceholderAutoConfiguration.class, RedisAutoConfiguration.class, EndpointAutoConfiguration.class, HealthIndicatorAutoConfiguration.class); assertThat(this.context.getBeanNamesForType(RedisConnectionFactory.class)) .hasSize(1); RedisHealthIndicator healthIndicator = this.context .getBean(RedisHealthIndicator.class); assertThat(healthIndicator).isNotNull(); }
@Before public void createContext() { this.context = new AnnotationConfigWebApplicationContext(); this.context.setServletContext(new MockServletContext()); this.context.register(JacksonAutoConfiguration.class, HttpMessageConvertersAutoConfiguration.class, EndpointAutoConfiguration.class, EndpointWebMvcAutoConfiguration.class, ManagementServerPropertiesAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class, JolokiaAutoConfiguration.class, WebMvcAutoConfiguration.class); }
@Test public void indicatorExists() { this.context = new AnnotationConfigApplicationContext( PropertyPlaceholderAutoConfiguration.class, MongoAutoConfiguration.class, MongoDataAutoConfiguration.class, EndpointAutoConfiguration.class, HealthIndicatorAutoConfiguration.class); assertEquals(1, this.context.getBeanNamesForType(MongoTemplate.class).length); MongoHealthIndicator healthIndicator = this.context .getBean(MongoHealthIndicator.class); assertNotNull(healthIndicator); }
@Test public void indicatorExists() { this.context = new AnnotationConfigApplicationContext( PropertyPlaceholderAutoConfiguration.class, RabbitAutoConfiguration.class, EndpointAutoConfiguration.class, HealthIndicatorAutoConfiguration.class); assertEquals(1, this.context.getBeanNamesForType(RabbitAdmin.class).length); RabbitHealthIndicator healthIndicator = this.context .getBean(RabbitHealthIndicator.class); assertNotNull(healthIndicator); }
@Test public void indicatorExists() { this.context = new AnnotationConfigApplicationContext( PropertyPlaceholderAutoConfiguration.class, SolrAutoConfiguration.class, EndpointAutoConfiguration.class, HealthIndicatorAutoConfiguration.class); assertEquals(1, this.context.getBeanNamesForType(SolrServer.class).length); SolrHealthIndicator healthIndicator = this.context .getBean(SolrHealthIndicator.class); assertNotNull(healthIndicator); }
@Test public void indicatorExists() { this.context = new AnnotationConfigApplicationContext( PropertyPlaceholderAutoConfiguration.class, RedisAutoConfiguration.class, EndpointAutoConfiguration.class, HealthIndicatorAutoConfiguration.class); assertEquals(1, this.context.getBeanNamesForType(RedisConnectionFactory.class).length); RedisHealthIndicator healthIndicator = this.context .getBean(RedisHealthIndicator.class); assertNotNull(healthIndicator); }