Skip to content

Commit

Permalink
Fix error mesage of ShouldNotHaveSameClass and test naming convention…
Browse files Browse the repository at this point in the history
… of same class assertions (#2038)

Co-authored-by: Kim S. Ly <lykims@users.noreply.github.com>
  • Loading branch information
lykims and lykims authored Nov 10, 2020
1 parent 4dca4e7 commit e78f410
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ public static ErrorMessageFactory shouldNotHaveSameClass(Object actual, Object o
}

private ShouldNotHaveSameClass(Object actual, Object other) {
super("%nExpecting:%n <%s>%nnot to have not the same class as:%n <%s> (%s)", actual, other, actual.getClass());
super("%nExpecting:%n <%s>%nnot to have the same class as:%n <%s> (%s)", actual, other, actual.getClass());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
* @author Nicolas François
*/
class AbstractAssert_doesNotHaveTheSameClassAs_Test extends AbstractAssertBaseTest {
class AbstractAssert_doesNotHaveSameClassAs_Test extends AbstractAssertBaseTest {

@Override
protected ConcreteAssert invoke_api_method() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
* @author Nicolas François
*/
class AbstractAssert_hasTheSameClassAs_Test extends AbstractAssertBaseTest {
class AbstractAssert_hasSameClassAs_Test extends AbstractAssertBaseTest {

@Override
protected ConcreteAssert invoke_api_method() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ void should_create_error_message() {
// WHEN
String message = factory.create(new TestDescription("Test"), new StandardRepresentation());
// THEN
then(message).isEqualTo(format("[Test] %nExpecting:%n <\"Yoda\">%nnot to have not the same class as:%n <\"Luke\"> (java.lang.String)"));
then(message).isEqualTo(format("[Test] %nExpecting:%n <\"Yoda\">%nnot to have the same class as:%n <\"Luke\"> (java.lang.String)"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @author Nicolas François
* @author Joel Costigliola
*/
class Objects_assertDoesNotHaveNotSameClassAs_Test extends ObjectsBaseTest {
class Objects_assertDoesNotHaveSameClassAs_Test extends ObjectsBaseTest {

private static Person actual;

Expand Down

0 comments on commit e78f410

Please sign in to comment.