Examples of WebMergedContextConfiguration


Examples of org.springframework.test.context.web.WebMergedContextConfiguration

   */
  @Test
  public void buildMergedConfigWithAtWebAppConfigurationWithAnnotationAndClassesOnSuperclass() {
    Class<?> webTestClass = WebClassesFoo.class;
    Class<?> standardTestClass = ClassesFoo.class;
    WebMergedContextConfiguration webMergedConfig = (WebMergedContextConfiguration) buildMergedContextConfiguration(webTestClass);
    MergedContextConfiguration standardMergedConfig = buildMergedContextConfiguration(standardTestClass);

    assertEquals(webMergedConfig, webMergedConfig);
    assertEquals(standardMergedConfig, standardMergedConfig);
    assertNotEquals(standardMergedConfig, webMergedConfig);
View Full Code Here

Examples of org.springframework.test.context.web.WebMergedContextConfiguration

  private static class WebConfigurer {

    void configure(MergedContextConfiguration configuration,
        SpringApplication application,
        List<ApplicationContextInitializer<?>> initializers) {
      WebMergedContextConfiguration webConfiguration = (WebMergedContextConfiguration) configuration;
      if (AnnotationUtils.findAnnotation(webConfiguration.getTestClass(),
          IntegrationTest.class) == null) {
        MockServletContext servletContext = new MockServletContext(
            webConfiguration.getResourceBasePath());
        initializers.add(0, new ServletContextApplicationContextInitializer(
            servletContext));
        application
            .setApplicationContextClass(GenericWebApplicationContext.class);
      }
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.