File tree Expand file tree Collapse file tree
hamcrest-core/src/test/java/org/hamcrest/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99import static org .hamcrest .core .IsEqual .equalTo ;
1010import static org .hamcrest .core .IsNot .not ;
1111import static org .hamcrest .core .IsNull .notNullValue ;
12- import static org .hamcrest .number .OrderingComparison .greaterThan ;
1312import static org .junit .Assert .assertEquals ;
1413
1514public class CombinableTest {
@@ -29,7 +28,6 @@ public void acceptsAndRejectsThreeAnds() {
2928 assertThat (3 , not (tripleAnd ));
3029 }
3130
32-
3331 @ Test
3432 public void bothDescribesItself () {
3533 assertEquals ("(not <3> and not <4>)" , NOT_3_AND_NOT_4 .toString ());
@@ -44,7 +42,7 @@ public void eitherAcceptsAndRejects() {
4442
4543 @ Test
4644 public void acceptsAndRejectsThreeOrs () {
47- final CombinableMatcher <Integer > orTriple = EITHER_3_OR_4 .or (greaterThan ( 10 ));
45+ final CombinableMatcher <Integer > orTriple = EITHER_3_OR_4 .or (equalTo ( 11 ));
4846 assertThat (11 , orTriple );
4947 assertThat (9 , not (orTriple ));
5048 }
Original file line number Diff line number Diff line change 22 */
33package org .hamcrest .core ;
44
5- import org .hamcrest .AbstractMatcherTest ;
6- import org .hamcrest .Matcher ;
7-
85import static org .hamcrest .core .IsEqual .equalTo ;
6+ import static org .hamcrest .core .IsInstanceOf .instanceOf ;
97import static org .hamcrest .core .IsNot .not ;
10- import static org .hamcrest .number .OrderingComparison .greaterThan ;
8+
9+ import org .hamcrest .AbstractMatcherTest ;
10+ import org .hamcrest .Matcher ;
1111
1212public class IsNotTest extends AbstractMatcherTest {
1313 @ Override
@@ -28,7 +28,7 @@ public void testProvidesConvenientShortcutForNotEqualTo() {
2828 }
2929
3030 public void testUsesDescriptionOfNegatedMatcherWithPrefix () {
31- assertDescription ("not a value greater than <2> " , not (greaterThan ( 2 )));
31+ assertDescription ("not an instance of java.lang.String " , not (instanceOf ( String . class )));
3232 assertDescription ("not \" A\" " , not ("A" ));
3333 }
3434 }
You can’t perform that action at this time.
0 commit comments