Package org.springframework.boot.actuate.endpoint

Examples of org.springframework.boot.actuate.endpoint.InfoEndpoint.invoke()


    EnvironmentTestUtils.addEnvironment(this.context, "info.foo:bar");
    this.context.register(EndpointAutoConfiguration.class);
    this.context.refresh();
    InfoEndpoint endpoint = this.context.getBean(InfoEndpoint.class);
    assertNotNull(endpoint);
    assertNotNull(endpoint.invoke().get("git"));
    assertEquals("bar", endpoint.invoke().get("foo"));
  }

  @Test
  public void testNoGitProperties() throws Exception {
View Full Code Here


    this.context.register(EndpointAutoConfiguration.class);
    this.context.refresh();
    InfoEndpoint endpoint = this.context.getBean(InfoEndpoint.class);
    assertNotNull(endpoint);
    assertNotNull(endpoint.invoke().get("git"));
    assertEquals("bar", endpoint.invoke().get("foo"));
  }

  @Test
  public void testNoGitProperties() throws Exception {
    this.context = new AnnotationConfigApplicationContext();
View Full Code Here

        "spring.git.properties:classpath:nonexistent");
    this.context.register(EndpointAutoConfiguration.class);
    this.context.refresh();
    InfoEndpoint endpoint = this.context.getBean(InfoEndpoint.class);
    assertNotNull(endpoint);
    assertNull(endpoint.invoke().get("git"));
  }

  private void load(Class<?>... config) {
    this.context = new AnnotationConfigApplicationContext();
    this.context.register(config);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.