Polish Javadoc for abstract JUnit 4 and TestNG base classes

This commit is contained in:
Sam Brannen
2019-10-02 14:26:50 +02:00
parent f16e29892e
commit 3a59b01be8
4 changed files with 24 additions and 25 deletions

View File

@@ -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,13 +35,13 @@ import org.springframework.test.context.web.ServletTestExecutionListener;
/**
* Abstract base test class which integrates the <em>Spring TestContext
* Framework</em> with explicit {@link ApplicationContext} testing support
* in a <strong>JUnit</strong> environment.
* in a <strong>JUnit 4</strong> environment.
*
* <p>Concrete subclasses should typically declare a class-level
* {@link ContextConfiguration @ContextConfiguration} annotation to
* configure the {@linkplain ApplicationContext application context} {@link
* ContextConfiguration#locations() resource locations} or {@link
* ContextConfiguration#classes() annotated classes}. <em>If your test does not
* configure the {@linkplain ApplicationContext application context} {@linkplain
* ContextConfiguration#locations() resource locations} or {@linkplain
* ContextConfiguration#classes() component classes}. <em>If your test does not
* need to load an application context, you may choose to omit the
* {@link ContextConfiguration @ContextConfiguration} declaration and to configure
* the appropriate {@link org.springframework.test.context.TestExecutionListener
@@ -64,13 +64,13 @@ import org.springframework.test.context.web.ServletTestExecutionListener;
* {@link SpringRunner}, {@link ContextConfiguration @ContextConfiguration},
* {@link TestExecutionListeners @TestExecutionListeners}, etc.</li>
* <li>If you wish to extend this class and use a runner other than the
* {@link SpringRunner}, as of Spring Framework 4.2 you can use
* {@link SpringRunner}, you can use
* {@link org.springframework.test.context.junit4.rules.SpringClassRule SpringClassRule} and
* {@link org.springframework.test.context.junit4.rules.SpringMethodRule SpringMethodRule}
* and specify your runner of choice via {@link RunWith @RunWith(...)}.</li>
* </ul>
*
* <p><strong>NOTE:</strong> As of Spring Framework 4.3, this class requires JUnit 4.12 or higher.
* <p><strong>NOTE:</strong> This class requires JUnit 4.12 or higher.
*
* @author Sam Brannen
* @since 2.5

View File

@@ -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.
@@ -56,6 +56,7 @@ import org.springframework.util.Assert;
*
* <ul>
* <li>{@link org.springframework.test.context.web.ServletTestExecutionListener}
* <li>{@link org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener}
* <li>{@link org.springframework.test.context.support.DependencyInjectionTestExecutionListener}
* <li>{@link org.springframework.test.context.support.DirtiesContextTestExecutionListener}
* <li>{@link org.springframework.test.context.transaction.TransactionalTestExecutionListener}
@@ -75,7 +76,7 @@ import org.springframework.util.Assert;
* and specify your runner of choice via {@link org.junit.runner.RunWith @RunWith(...)}.</li>
* </ul>
*
* <p><strong>NOTE:</strong> As of Spring Framework 4.3, this class requires JUnit 4.12 or higher.
* <p><strong>NOTE:</strong> This class requires JUnit 4.12 or higher.
*
* @author Sam Brannen
* @author Juergen Hoeller

View File

@@ -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.
@@ -46,19 +46,16 @@ import org.springframework.test.context.web.ServletTestExecutionListener;
* with explicit {@link ApplicationContext} testing support in a <strong>TestNG</strong>
* environment.
*
* <p>Concrete subclasses:
* <ul>
* <li>Typically declare a class-level {@link ContextConfiguration
* &#064;ContextConfiguration} annotation to configure the {@linkplain ApplicationContext
* application context} {@linkplain ContextConfiguration#locations() resource locations}
* or {@linkplain ContextConfiguration#classes() annotated classes}. <em>If your test
* does not need to load an application context, you may choose to omit the
* {@code @ContextConfiguration} declaration and to configure the appropriate
* {@link org.springframework.test.context.TestExecutionListener TestExecutionListeners}
* manually.</em></li>
* <li>Must have constructors which either implicitly or explicitly delegate to
* {@code super();}.</li>
* </ul>
* <p>Concrete subclasses should typically declare a class-level
* {@link ContextConfiguration @ContextConfiguration} annotation to
* configure the {@linkplain ApplicationContext application context} {@linkplain
* ContextConfiguration#locations() resource locations} or {@linkplain
* ContextConfiguration#classes() component classes}. <em>If your test does not
* need to load an application context, you may choose to omit the
* {@link ContextConfiguration @ContextConfiguration} declaration and to configure
* the appropriate {@link org.springframework.test.context.TestExecutionListener
* TestExecutionListeners} manually.</em> Concrete subclasses must also have
* constructors which either implicitly or explicitly delegate to {@code super();}.
*
* <p>The following {@link org.springframework.test.context.TestExecutionListener
* TestExecutionListeners} are configured by default:
@@ -105,7 +102,7 @@ public abstract class AbstractTestNGSpringContextTests implements IHookable, App
/**
* Construct a new AbstractTestNGSpringContextTests instance and initialize
* Construct a new {@code AbstractTestNGSpringContextTests} instance and initialize
* the internal {@link TestContextManager} for the current test class.
*/
public AbstractTestNGSpringContextTests() {

View File

@@ -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.
@@ -55,6 +55,7 @@ import org.springframework.util.Assert;
*
* <ul>
* <li>{@link org.springframework.test.context.web.ServletTestExecutionListener}
* <li>{@link org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener}
* <li>{@link org.springframework.test.context.support.DependencyInjectionTestExecutionListener}
* <li>{@link org.springframework.test.context.support.DirtiesContextTestExecutionListener}
* <li>{@link org.springframework.test.context.transaction.TransactionalTestExecutionListener}