You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: webtau-core/src/test/groovy/org/testingisdocumenting/webtau/expectation/equality/NotEqualMatcherTest.groovy
+34Lines changed: 34 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,40 @@ class NotEqualMatcherTest {
60
60
}
61
61
}
62
62
63
+
@Test
64
+
void"delegates to matcher in case of negative mismatch if passed as expected"() {
65
+
runExpectExceptionAndValidateOutput(AssertionError.class, 'X failed expecting [value] to not match any of [30, 100]:\n'+
66
+
' actual: 100 <java.lang.Integer>\n'+
67
+
' expected: not 100 <java.lang.Integer> (Xms)') {
68
+
actual(100).should(notEqual(anyOf(30, 100)))
69
+
}
70
+
}
71
+
72
+
@Test
73
+
void"delegates to matcher in case of negative match if passed as expected"() {
74
+
runAndValidateOutput(". [value] doesn't match any of [30, 110] (Xms)") {
75
+
actual(100).should(notEqual(anyOf(30, 110)))
76
+
}
77
+
}
78
+
79
+
@Test
80
+
void"delegates to matcher in case of positive mismatch if passed as expected"() {
81
+
runExpectExceptionAndValidateOutput(AssertionError.class, 'X failed expecting [value] to match any of [30, 110]:\n'+
82
+
' actual: 100 <java.lang.Integer>\n'+
83
+
' expected: 30 <java.lang.Integer>\n'+
84
+
' actual: 100 <java.lang.Integer>\n'+
85
+
' expected: 110 <java.lang.Integer> (Xms)') {
86
+
actual(100).shouldNot(notEqual(anyOf(30, 110)))
87
+
}
88
+
}
89
+
90
+
@Test
91
+
void"delegates to matcher in case of positive match if passed as expected"() {
92
+
runAndValidateOutput(". [value] matches any of [30, 100] (Xms)") {
93
+
actual(100).shouldNot(notEqual(anyOf(30, 100)))
94
+
}
95
+
}
96
+
63
97
@Test
64
98
void"matching message"() {
65
99
assert matcher.matchingTokenizedMessage(actualPath, 100).toString() =="to not equal $expected"
0 commit comments