Browse Source

Polishing

pull/22500/head
Sam Brannen 7 years ago
parent
commit
297fd7629a
  1. 25
      spring-test/src/main/java/org/springframework/test/context/ContextConfiguration.java
  2. 4
      spring-test/src/main/java/org/springframework/test/context/TestContext.java
  3. 14
      spring-test/src/main/java/org/springframework/test/context/TestContextManager.java

25
spring-test/src/main/java/org/springframework/test/context/ContextConfiguration.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -34,8 +34,7 @@ import org.springframework.core.annotation.AliasFor; @@ -34,8 +34,7 @@ import org.springframework.core.annotation.AliasFor;
*
* <h3>Supported Resource Types</h3>
*
* <p>
* Prior to Spring 3.1, only path-based resource locations (typically XML configuration
* <p>Prior to Spring 3.1, only path-based resource locations (typically XML configuration
* files) were supported. As of Spring 3.1, {@linkplain #loader context loaders} may
* choose to support <em>either</em> path-based <em>or</em> class-based resources. As of
* Spring 4.0.4, {@linkplain #loader context loaders} may choose to support path-based
@ -50,8 +49,7 @@ import org.springframework.core.annotation.AliasFor; @@ -50,8 +49,7 @@ import org.springframework.core.annotation.AliasFor;
*
* <h3>Annotated Classes</h3>
*
* <p>
* The term <em>annotated class</em> can refer to any of the following.
* <p>The term <em>annotated class</em> can refer to any of the following.
*
* <ul>
* <li>A class annotated with {@link org.springframework.context.annotation.Configuration @Configuration}</li>
@ -63,25 +61,24 @@ import org.springframework.core.annotation.AliasFor; @@ -63,25 +61,24 @@ import org.springframework.core.annotation.AliasFor;
* <li>Any other class that contains {@link org.springframework.context.annotation.Bean @Bean}-methods</li>
* </ul>
*
* <p>
* Consult the Javadoc for {@link org.springframework.context.annotation.Configuration @Configuration}
* <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 <em>annotated classes</em>.
*
* <p>
* As of Spring Framework 4.0, this annotation may be used as a <em>meta-annotation</em>
* <p>As of Spring Framework 4.0, this annotation may be used as a <em>meta-annotation</em>
* to create custom <em>composed annotations</em>.
*
* @author Sam Brannen
* @since 2.5
* @see ContextHierarchy
* @see ActiveProfiles
* @see TestPropertySource
* @see ContextLoader
* @see org.springframework.test.context.junit.jupiter.SpringJUnitConfig @SpringJUnitConfig
* @see org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig @SpringJUnitWebConfig
* @see ContextHierarchy @ContextHierarchy
* @see ActiveProfiles @ActiveProfiles
* @see TestPropertySource @TestPropertySource
* @see SmartContextLoader
* @see ContextConfigurationAttributes
* @see MergedContextConfiguration
* @see org.springframework.context.ApplicationContext
* @see org.springframework.context.ApplicationContext ApplicationContext
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)

4
spring-test/src/main/java/org/springframework/test/context/TestContext.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -38,6 +38,8 @@ import org.springframework.test.annotation.DirtiesContext.HierarchyMode; @@ -38,6 +38,8 @@ import org.springframework.test.annotation.DirtiesContext.HierarchyMode;
*
* @author Sam Brannen
* @since 2.5
* @see TestContextManager
* @see TestExecutionListener
*/
public interface TestContext extends AttributeAccessor, Serializable {

14
spring-test/src/main/java/org/springframework/test/context/TestContextManager.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -35,9 +35,8 @@ import org.springframework.util.ReflectionUtils; @@ -35,9 +35,8 @@ import org.springframework.util.ReflectionUtils;
* TestContext Framework</em>.
*
* <p>Specifically, a {@code TestContextManager} is responsible for managing a
* single {@link TestContext} and signaling events to all registered
* {@link TestExecutionListener TestExecutionListeners} at the following test
* execution points:
* single {@link TestContext} and signaling events to each registered
* {@link TestExecutionListener} at the following test execution points.
*
* <ul>
* <li>{@link #beforeTestClass() before test class execution}: prior to any
@ -67,10 +66,9 @@ import org.springframework.util.ReflectionUtils; @@ -67,10 +66,9 @@ import org.springframework.util.ReflectionUtils;
* dependency injection of test instances,
* {@linkplain org.springframework.transaction.annotation.Transactional transactional}
* execution of test methods, etc. is provided by
* {@link SmartContextLoader ContextLoaders} and {@link TestExecutionListener
* TestExecutionListeners}, which are configured via
* {@link ContextConfiguration @ContextConfiguration} and
* {@link TestExecutionListeners @TestExecutionListeners}.
* {@link SmartContextLoader ContextLoaders} and {@code TestExecutionListeners},
* which are configured via {@link ContextConfiguration @ContextConfiguration} and
* {@link TestExecutionListeners @TestExecutionListeners}, respectively.
*
* <p>Bootstrapping of the {@code TestContext}, the default {@code ContextLoader},
* default {@code TestExecutionListeners}, and their collaborators is performed

Loading…
Cancel
Save