|
1 | 1 | package de.tobiasroeser.lambdatest; |
2 | 2 |
|
| 3 | +import static de.tobiasroeser.lambdatest.Expect.expectEquals; |
| 4 | +import static de.tobiasroeser.lambdatest.Expect.expectNotEquals; |
3 | 5 | import static de.tobiasroeser.lambdatest.Expect.expectTrue; |
4 | 6 |
|
5 | 7 | import java.text.MessageFormat; |
@@ -38,21 +40,22 @@ private ExpectString check(final boolean cond, final String msg, final Object... |
38 | 40 | return this; |
39 | 41 | } |
40 | 42 |
|
41 | | - public ExpectString equals(final String expected) { |
42 | | - return check(actual.equals(expected), "Actual is not equal to \"{0}\", actual: \"{1}\"", expected, actual); |
| 43 | + public ExpectString isEqual(final String expected) { |
| 44 | + expectEquals(actual, expected); |
| 45 | + return this; |
43 | 46 | } |
44 | 47 |
|
45 | | - public ExpectString equalsNot(final String expected) { |
46 | | - return check(!actual.equals(expected), "Actual must not be equal to \"{0}\", actual: \"{1}\"", expected, |
47 | | - actual); |
| 48 | + public ExpectString isNotEqual(final String expected) { |
| 49 | + expectNotEquals(actual, expected); |
| 50 | + return this; |
48 | 51 | } |
49 | 52 |
|
50 | | - public ExpectString equalsIgnoreCase(final String expected) { |
| 53 | + public ExpectString isEqualIgnoreCase(final String expected) { |
51 | 54 | return check(actual.equalsIgnoreCase(expected), "Actual is not equal to \"{0}\" (ignore case), actual: \"{1}\"", |
52 | 55 | expected, actual); |
53 | 56 | } |
54 | 57 |
|
55 | | - public ExpectString equalsIgnoreCaseNot(final String expected) { |
| 58 | + public ExpectString isNotEqualIgnoreCase(final String expected) { |
56 | 59 | return check(!actual.equalsIgnoreCase(expected), |
57 | 60 | "Actual must not be equal to \"{0}\" (ignore case), actual: \"{1}\"", expected, |
58 | 61 | actual); |
@@ -127,5 +130,4 @@ public ExpectString containsIgnoreCaseNot(final String fragment) { |
127 | 130 | actual); |
128 | 131 | } |
129 | 132 |
|
130 | | - |
131 | 133 | } |
0 commit comments