Skip to content

Commit

Permalink
Fixes junit-team#254: replaced @rule by @ClassRule
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanbirkner committed Jul 6, 2011
1 parent ced634a commit 73c15ac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion doc/ReleaseNotes4.9.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h3>ClassRule</h3>
public class UsesExternalResource {
public static Server myServer= new Server();

@Rule
@ClassRule
public static ExternalResource resource= new ExternalResource() {
@Override
protected void before() throws Throwable {
Expand Down
2 changes: 1 addition & 1 deletion doc/ReleaseNotes4.9.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ all the test classes run, and disconnects after they are finished:
public class UsesExternalResource {
public static Server myServer= new Server();

@Rule
@ClassRule
public static ExternalResource resource= new ExternalResource() {
@Override
protected void before() throws Throwable {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/junit/ClassRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* public class UsesExternalResource {
* public static Server myServer= new Server();
*
* &#064;Rule
* &#064;ClassRule
* public static ExternalResource resource= new ExternalResource() {
* &#064;Override
* protected void before() throws Throwable {
Expand All @@ -57,4 +57,4 @@
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD})
public @interface ClassRule {
}
}

0 comments on commit 73c15ac

Please sign in to comment.