Polish Javadoc for TestContext

This commit is contained in:
Sam Brannen 2015-03-22 18:40:48 +01:00
parent 9172a6d05e
commit 6028a64444
1 changed files with 12 additions and 11 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2013 the original author or authors. * Copyright 2002-2015 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -33,9 +33,8 @@ import org.springframework.test.annotation.DirtiesContext.HierarchyMode;
public interface TestContext extends AttributeAccessor, Serializable { public interface TestContext extends AttributeAccessor, Serializable {
/** /**
* Get the {@link ApplicationContext application context} for this test * Get the {@linkplain ApplicationContext application context} for this
* context, possibly cached. * test context, possibly cached.
*
* <p>Implementations of this method are responsible for loading the * <p>Implementations of this method are responsible for loading the
* application context if the corresponding context has not already been * application context if the corresponding context has not already been
* loaded, potentially caching the context as well. * loaded, potentially caching the context as well.
@ -46,13 +45,13 @@ public interface TestContext extends AttributeAccessor, Serializable {
ApplicationContext getApplicationContext(); ApplicationContext getApplicationContext();
/** /**
* Get the {@link Class test class} for this test context. * Get the {@linkplain Class test class} for this test context.
* @return the test class (never {@code null}) * @return the test class (never {@code null})
*/ */
Class<?> getTestClass(); Class<?> getTestClass();
/** /**
* Get the current {@link Object test instance} for this test context. * Get the current {@linkplain Object test instance} for this test context.
* <p>Note: this is a mutable property. * <p>Note: this is a mutable property.
* @return the current test instance (may be {@code null}) * @return the current test instance (may be {@code null})
* @see #updateState(Object, Method, Throwable) * @see #updateState(Object, Method, Throwable)
@ -60,7 +59,7 @@ public interface TestContext extends AttributeAccessor, Serializable {
Object getTestInstance(); Object getTestInstance();
/** /**
* Get the current {@link Method test method} for this test context. * Get the current {@linkplain Method test method} for this test context.
* <p>Note: this is a mutable property. * <p>Note: this is a mutable property.
* @return the current test method (may be {@code null}) * @return the current test method (may be {@code null})
* @see #updateState(Object, Method, Throwable) * @see #updateState(Object, Method, Throwable)
@ -68,8 +67,8 @@ public interface TestContext extends AttributeAccessor, Serializable {
Method getTestMethod(); Method getTestMethod();
/** /**
* Get the {@link Throwable exception} that was thrown during execution of * Get the {@linkplain Throwable exception} that was thrown during execution
* the {@link #getTestMethod() test method}. * of the {@linkplain #getTestMethod() test method}.
* <p>Note: this is a mutable property. * <p>Note: this is a mutable property.
* @return the exception that was thrown, or {@code null} if no * @return the exception that was thrown, or {@code null} if no
* exception was thrown * exception was thrown
@ -80,8 +79,10 @@ public interface TestContext extends AttributeAccessor, Serializable {
/** /**
* Call this method to signal that the {@linkplain ApplicationContext application * Call this method to signal that the {@linkplain ApplicationContext application
* context} associated with this test context is <em>dirty</em> and should be * context} associated with this test context is <em>dirty</em> and should be
* discarded. Do this if a test has modified the context &mdash; for example, * removed from the context cache.
* by replacing a bean definition or modifying the state of a singleton bean. * <p>Do this if a test has modified the context &mdash; for example, by
* modifying the state of a singleton bean, modifying the state of an embedded
* database, etc.
* @param hierarchyMode the context cache clearing mode to be applied if the * @param hierarchyMode the context cache clearing mode to be applied if the
* context is part of a hierarchy (may be {@code null}) * context is part of a hierarchy (may be {@code null})
*/ */