Skip to content

Commit

Permalink
Document context hierarchy support in the TCF
Browse files Browse the repository at this point in the history
This commit polishes the Javadoc for @ContextHierarchy and
@ContextConfiguration.

Issue: SPR-10357
  • Loading branch information
sbrannen committed Mar 10, 2013
1 parent 4e7098d commit ccdb482
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
* {@link org.springframework.context.annotation.Bean @Bean}-methods</li>
* </ul>
*
* Consult the Javadoc for
* <p>Consult the Javadoc for
* {@link org.springframework.context.annotation.Configuration @Configuration} and
* {@link org.springframework.context.annotation.Bean @Bean}
* for further information regarding the configuration and semantics of
Expand Down Expand Up @@ -270,16 +270,25 @@
* explicit loader. If no class in the hierarchy specifies an explicit
* loader, a default loader will be used instead.
*
* <p>The default concrete implementation chosen at runtime will be
* <p>The default concrete implementation chosen at runtime will be either
* {@link org.springframework.test.context.support.DelegatingSmartContextLoader
* DelegatingSmartContextLoader}. For further details on the default behavior
* of various concrete {@code ContextLoaders}, check out the Javadoc for
* DelegatingSmartContextLoader} or
* {@link org.springframework.test.context.web.WebDelegatingSmartContextLoader
* WebDelegatingSmartContextLoader} depending on the absence or presence of
* {@link org.springframework.test.context.web.WebAppConfiguration
* &#064;WebAppConfiguration}. For further details on the default behavior
* of various concrete {@code SmartContextLoaders}, check out the Javadoc for
* {@link org.springframework.test.context.support.AbstractContextLoader
* AbstractContextLoader},
* {@link org.springframework.test.context.support.GenericXmlContextLoader
* GenericXmlContextLoader}, and
* GenericXmlContextLoader},
* {@link org.springframework.test.context.support.AnnotationConfigContextLoader
* AnnotationConfigContextLoader}.
* AnnotationConfigContextLoader},
* {@link org.springframework.test.context.web.GenericXmlWebContextLoader
* GenericXmlWebContextLoader}, and
* {@link org.springframework.test.context.web.AnnotationConfigWebContextLoader
* AnnotationConfigWebContextLoader}.
*
* @since 2.5
*/
Class<? extends ContextLoader> loader() default ContextLoader.class;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
* a hierarchy of {@link org.springframework.context.ApplicationContext
* ApplicationContexts} for integration tests.
*
* <h2>Examples</h2>
* <h3>Examples</h3>
* <p>The following JUnit-based examples demonstrate common configuration
* scenarios for integration tests that require the use of context hierarchies.
*
* <h3>Single Test Class with Context Hierarchy</h3>
* <h4>Single Test Class with Context Hierarchy</h4>
* <p>{@code ControllerIntegrationTests} represents a typical integration testing
* scenario for a Spring MVC web application by declaring a context hierarchy
* consisting of two levels, one for the <em>root</em> {@code WebApplicationContext}
Expand All @@ -56,7 +56,7 @@
* // ...
* }</pre>
*
* <h3>Class Hierarchy with Implicit Parent Context</h3>
* <h4>Class Hierarchy with Implicit Parent Context</h4>
* <p>The following test classes define a context hierarchy within a test class
* hierarchy. {@code AbstractWebTests} declares the configuration for a root
* {@code WebApplicationContext} in a Spring-powered web application. Note,
Expand All @@ -82,7 +82,7 @@
* &#064;ContextHierarchy(&#064;ContextConfiguration("/spring/rest-ws-config.xml")
* public class RestWebServiceTests extends AbstractWebTests {}</pre>
*
* <h3>Class Hierarchy with Merged Context Hierarchy Configuration</h3>
* <h4>Class Hierarchy with Merged Context Hierarchy Configuration</h4>
* <p>The following classes demonstrate the use of <em>named</em> hierarchy levels
* in order to <em>merge</em> the configuration for specific levels in a context
* hierarchy. {@code BaseTests} defines two levels in the hierarchy, {@code parent}
Expand Down Expand Up @@ -110,7 +110,7 @@
* )
* public class ExtendedTests extends BaseTests {}</pre>
*
* <h3>Class Hierarchy with Overridden Context Hierarchy Configuration</h3>
* <h4>Class Hierarchy with Overridden Context Hierarchy Configuration</h4>
* <p>In contrast to the previous example, this example demonstrates how to
* <em>override</em> the configuration for a given named level in a context hierarchy
* by setting the {@link ContextConfiguration#inheritLocations} flag to {@code false}.
Expand Down

0 comments on commit ccdb482

Please sign in to comment.