forked from junit-team/junit4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proof-of-concept for class-level @rule support
- Loading branch information
Showing
5 changed files
with
112 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* Created Oct 19, 2009 | ||
*/ | ||
package org.junit.rules; | ||
|
||
import org.junit.runners.model.Statement; | ||
import org.junit.runners.model.TestClass; | ||
|
||
/** | ||
* A ClassRule is the class-level analogue to a | ||
* {@link org.junit.rules.MethodRule}. | ||
* | ||
* @author Alistair A. Israel | ||
*/ | ||
public interface ClassRule { | ||
|
||
/** | ||
* Modifies the class-running {@link Statement} to implement an additional, | ||
* class-level test-running rule. | ||
* | ||
* @param base | ||
* The {@link Statement} to be modified | ||
* @param method | ||
* The {@link TestClass} to be run | ||
* @return a new statement, which may be the same as {@code base}, a wrapper | ||
* around {@code base}, or a completely new Statement. | ||
*/ | ||
Statement apply(Statement base, TestClass testClass); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79ef5a7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for issue 29, right?