commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1749394 - /commons/proper/email/trunk/src/test/java/org/apache/commons/mail/AbstractEmailTest.java
Date Mon, 20 Jun 2016 20:02:53 GMT
Author: britter
Date: Mon Jun 20 20:02:53 2016
New Revision: 1749394

URL: http://svn.apache.org/viewvc?rev=1749394&view=rev
Log:
Use assertThat to see better what's causing problems on Jenkins

Modified:
    commons/proper/email/trunk/src/test/java/org/apache/commons/mail/AbstractEmailTest.java

Modified: commons/proper/email/trunk/src/test/java/org/apache/commons/mail/AbstractEmailTest.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/test/java/org/apache/commons/mail/AbstractEmailTest.java?rev=1749394&r1=1749393&r2=1749394&view=diff
==============================================================================
--- commons/proper/email/trunk/src/test/java/org/apache/commons/mail/AbstractEmailTest.java
(original)
+++ commons/proper/email/trunk/src/test/java/org/apache/commons/mail/AbstractEmailTest.java
Mon Jun 20 20:02:53 2016
@@ -17,6 +17,7 @@
 package org.apache.commons.mail;
 
 import static org.easymock.EasyMock.expect;
+import static org.hamcrest.CoreMatchers.containsString;
 import static org.junit.Assert.*;
 import static org.powermock.api.easymock.PowerMock.createMock;
 import static org.powermock.api.easymock.PowerMock.replay;
@@ -381,8 +382,8 @@ public abstract class AbstractEmailTest
             true);
 
         // test message content
-        assertTrue("didn't find expected message content in message body",
-                getMessageBody(emailMessage).contains(strMessage));
+        assertThat("didn't find expected message content in message body",
+                getMessageBody(emailMessage), containsString(strMessage));
     }
 
     /**



Mime
View raw message