carterkozak commented on a change in pull request #468:
URL: https://github.com/apache/logging-log4j2/pull/468#discussion_r579498048



##########
File path: log4j-1.2-api/src/test/java/org/apache/log4j/CategoryTest.java
##########
@@ -78,23 +78,23 @@ public void testForcedLog() {
         category.info("Hello, World");
         final List<LogEvent> list = appender.getEvents();
         int events = list.size();
-        assertTrue("Number of events should be 1, was " + events, events == 1);
+        assertThat(events).describedAs("Number of events should be 1, was " + 
events).isEqualTo(1);
         LogEvent event = list.get(0);
         Message msg = event.getMessage();
-        assertNotNull("No message", msg);
-        assertTrue("Incorrect Message type", msg instanceof ObjectMessage);
+        assertThat(msg).describedAs("No message").isNotNull();
+        assertThat(msg instanceof ObjectMessage).describedAs("Incorrect 
Message type").isTrue();

Review comment:
       I thought I'd written a transformation for these, perhaps not!
   Should end up with:
   ```suggestion
           assertThat(msg).describedAs("Incorrect Message 
type").isInstanceof(ObjectMessage.class);
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to