Skip to content

Commit 4a9404e

Browse files
author
joeretro
committed
JUnit MatcherAssert now has static methods to make it more JUnity
1 parent 1695ec0 commit 4a9404e

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

‎src/integration/org/hamcrest/junit/MatcherAssert.java‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
public class MatcherAssert extends Assert {
1111

12-
public void assertThat(Object actual, Matcher matcher) {
12+
public static void assertThat(Object actual, Matcher matcher) {
1313
if (!matcher.match(actual)) {
1414
Description description = new StringDescription();
1515
description.appendText("\nExpected: ");
@@ -19,35 +19,35 @@ public void assertThat(Object actual, Matcher matcher) {
1919
}
2020
}
2121

22-
public void assertThat(boolean actual, Matcher matcher) {
22+
public static void assertThat(boolean actual, Matcher matcher) {
2323
assertThat(actual ? Boolean.TRUE : Boolean.FALSE, matcher);
2424
}
2525

26-
public void assertThat(byte actual, Matcher matcher) {
26+
public static void assertThat(byte actual, Matcher matcher) {
2727
assertThat(new Byte(actual), matcher);
2828
}
2929

30-
public void assertThat(short actual, Matcher matcher) {
30+
public static void assertThat(short actual, Matcher matcher) {
3131
assertThat(new Short(actual), matcher);
3232
}
3333

34-
public void assertThat(char actual, Matcher matcher) {
34+
public static void assertThat(char actual, Matcher matcher) {
3535
assertThat(new Character(actual), matcher);
3636
}
3737

38-
public void assertThat(int actual, Matcher matcher) {
38+
public static void assertThat(int actual, Matcher matcher) {
3939
assertThat(new Integer(actual), matcher);
4040
}
4141

42-
public void assertThat(long actual, Matcher matcher) {
42+
public static void assertThat(long actual, Matcher matcher) {
4343
assertThat(new Long(actual), matcher);
4444
}
4545

46-
public void assertThat(float actual, Matcher matcher) {
46+
public static void assertThat(float actual, Matcher matcher) {
4747
assertThat(new Float(actual), matcher);
4848
}
4949

50-
public void assertThat(double actual, Matcher matcher) {
50+
public static void assertThat(double actual, Matcher matcher) {
5151
assertThat(new Double(actual), matcher);
5252
}
5353

0 commit comments

Comments
 (0)