Package org.springframework.context.annotation

Examples of org.springframework.context.annotation.AnnotationConfigApplicationContext.stop()


    container.run();
    assertThat(stateWrapper.state, is(ContainerState.COMPLETED));
    assertThat(stateWrapper.exit, instanceOf(Integer.class));
    assertThat((Integer)stateWrapper.exit, is(0));

    context.stop();
  }

  @Test
  public void testContainerBooleanBean() {
    @SuppressWarnings("resource")
View Full Code Here


    container.run();
    assertThat(stateWrapper.state, is(ContainerState.COMPLETED));
    assertThat(stateWrapper.exit, instanceOf(Boolean.class));
    assertThat((Boolean)stateWrapper.exit, is(true));

    context.stop();
  }

  @Test
  public void testContainerIntRetBean() {
    @SuppressWarnings("resource")
View Full Code Here

    container.run();
    assertThat(stateWrapper.state, is(ContainerState.COMPLETED));
    assertThat(stateWrapper.exit, instanceOf(Integer.class));
    assertThat((Integer)stateWrapper.exit, is(10));

    context.stop();
  }

  @Test
  public void testContainerBeanThrowsException() {
    @SuppressWarnings("resource")
View Full Code Here

    container.run();
    assertThat(stateWrapper.state, is(ContainerState.FAILED));
    assertThat(stateWrapper.exit, instanceOf(Exception.class));

    context.stop();
  }

  @Test
  public void testContainerBeanThrowsExceptionTwoAnnotations() {
    @SuppressWarnings("resource")
View Full Code Here

    container.run();
    assertThat(stateWrapper.state, is(ContainerState.FAILED));
    assertThat(stateWrapper.exit, instanceOf(Exception.class));

    context.stop();
  }

  @Test
  public void testContainerStringBean() {
    @SuppressWarnings("resource")
View Full Code Here

    container.run();
    assertThat(stateWrapper.state, is(ContainerState.COMPLETED));
    assertThat(stateWrapper.exit, instanceOf(String.class));
    assertThat((String)stateWrapper.exit, is("UNKNOWN"));

    context.stop();
  }

  @Configuration
  static class BaseConfig {
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.