polishing
This commit is contained in:
@@ -67,7 +67,10 @@ import org.springframework.util.Assert;
|
||||
* @author Sam Brannen
|
||||
* @author Juergen Hoeller
|
||||
* @since 2.0
|
||||
* @deprecated as of Spring 3.0, in favor of using the listener-based test context framework
|
||||
* ({@link org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests})
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class AbstractAnnotationAwareTransactionalTests extends
|
||||
AbstractTransactionalDataSourceSpringContextTests {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2007 the original author or authors.
|
||||
* Copyright 2002-2009 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.
|
||||
@@ -23,27 +23,14 @@ import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Test annotation to indicate that a test method <em>dirties</em> the context
|
||||
* for the current test.
|
||||
* </p>
|
||||
* <p>
|
||||
* Using this annotation in conjunction with
|
||||
* {@link AbstractAnnotationAwareTransactionalTests} is less error-prone than
|
||||
* calling
|
||||
* {@link org.springframework.test.AbstractSingleSpringContextTests#setDirty() setDirty()}
|
||||
* explicitly because the call to <code>setDirty()</code> is guaranteed to
|
||||
* occur, even if the test failed. If only a particular code path in the test
|
||||
* dirties the context, prefer calling <code>setDirty()</code> explicitly --
|
||||
* and take care!
|
||||
* </p>
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @author Sam Brannen
|
||||
* @since 2.0
|
||||
* @see org.springframework.test.AbstractSingleSpringContextTests
|
||||
*/
|
||||
@Target( { ElementType.METHOD })
|
||||
@Target({ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface DirtiesContext {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2007 the original author or authors.
|
||||
* Copyright 2002-2009 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.
|
||||
@@ -31,16 +31,14 @@ import java.lang.annotation.Target;
|
||||
* @author Sam Brannen
|
||||
* @since 2.5
|
||||
*/
|
||||
@Target( { ElementType.METHOD })
|
||||
@Target({ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface Rollback {
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Whether or not the transaction for the annotated method should be rolled
|
||||
* back after the method has completed.
|
||||
* </p>
|
||||
*/
|
||||
boolean value() default true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user