Skip to content

Commit

Permalink
Update AssertTest.java
Browse files Browse the repository at this point in the history
Use `assertNotNull()` instead.
  • Loading branch information
kluever authored Nov 14, 2022
1 parent ec20483 commit 86b979e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/java/junit/tests/framework/AssertTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ public void testAssertStringNotEqualsNull() {
assertEquals("foo", null);
fail();
} catch (ComparisonFailure e) {
String unused = e.getMessage(); // why no assertion?
assertNotNull(e.getMessage());
}
}

public void testAssertNullNotEqualsNull() {
try {
assertEquals(null, new Object());
} catch (AssertionFailedError e) {
String unused = e.getMessage(); // why no assertion?
assertNotNull(e.getMessage());
return;
}
fail();
Expand Down

0 comments on commit 86b979e

Please sign in to comment.