Skip to content

Commit b906d8a

Browse files
author
jon.m.reid
committed
Changed those matchers that describe themselves as xxx(...) so that xxx matches the name of the factory function.
1 parent 52d4727 commit b906d8a

6 files changed

Lines changed: 11 additions & 7 deletions

File tree

‎hamcrest-core/src/main/java/org/hamcrest/core/IsSame.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ public boolean matches(Object arg) {
2323
}
2424

2525
public void describeTo(Description description) {
26-
description.appendText("same(") .appendValue(object) .appendText(")");
26+
description.appendText("sameInstance(")
27+
.appendValue(object)
28+
.appendText(")");
2729
}
2830

2931
/**

‎hamcrest-library/src/main/java/org/hamcrest/text/IsEqualIgnoringCase.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public boolean matchesSafely(String item) {
2929
}
3030

3131
public void describeTo(Description description) {
32-
description.appendText("eqIgnoringCase(")
32+
description.appendText("equalToIgnoringCase(")
3333
.appendValue(string)
3434
.appendText(")");
3535
}

‎hamcrest-library/src/main/java/org/hamcrest/text/IsEqualIgnoringWhiteSpace.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public boolean matchesSafely(String item) {
2929
}
3030

3131
public void describeTo(Description description) {
32-
description.appendText("eqIgnoringWhiteSpace(")
32+
description.appendText("equalToIgnoringWhiteSpace(")
3333
.appendValue(string)
3434
.appendText(")");
3535
}

‎hamcrest-unit-test/src/main/java/org/hamcrest/core/IsSameTest.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ public void testEvaluatesToTrueIfArgumentIsReferenceToASpecifiedObject() {
2424
}
2525

2626
public void testReturnsReadableDescriptionFromToString() {
27-
assertDescription("same(\"ARG\")", sameInstance("ARG"));
27+
assertDescription("sameInstance(\"ARG\")", sameInstance("ARG"));
2828
}
2929

3030
public void testReturnsReadableDescriptionFromToStringWhenInitialisedWithNull() {
31-
assertDescription("same(null)", sameInstance(null));
31+
assertDescription("sameInstance(null)", sameInstance(null));
3232
}
3333
}

‎hamcrest-unit-test/src/main/java/org/hamcrest/text/IsEqualIgnoringCaseTest.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public void testRequiresNonNullStringToBeConstructed() {
4141
}
4242

4343
public void testDescribesItselfAsCaseInsensitive() {
44-
assertDescription("eqIgnoringCase(\"heLLo\")", equalToIgnoringCase("heLLo"));
44+
assertDescription("equalToIgnoringCase(\"heLLo\")",
45+
equalToIgnoringCase("heLLo"));
4546
}
4647
}

‎hamcrest-unit-test/src/main/java/org/hamcrest/text/IsEqualIgnoringWhiteSpaceTest.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public void testRequiresNonNullStringToBeConstructed() {
4545
}
4646

4747
public void testHasAReadableDescription() {
48-
assertDescription("eqIgnoringWhiteSpace(\"Hello World how\\n are we? \")", matcher);
48+
assertDescription("equalToIgnoringWhiteSpace(\"Hello World how\\n are we? \")",
49+
matcher);
4950
}
5051
}

0 commit comments

Comments
 (0)