commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1669815 - /commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/OptionsTest.java
Date Sat, 28 Mar 2015 18:11:07 GMT
Author: britter
Date: Sat Mar 28 18:11:07 2015
New Revision: 1669815

URL: http://svn.apache.org/r1669815
Log:
Use String.contains(String) instead of checking for index

Modified:
    commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/OptionsTest.java

Modified: commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/OptionsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/OptionsTest.java?rev=1669815&r1=1669814&r2=1669815&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/OptionsTest.java (original)
+++ commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/OptionsTest.java Sat Mar
28 18:11:07 2015
@@ -147,8 +147,8 @@ public class OptionsTest
 
         String s = options.toString();
         assertNotNull("null string returned", s);
-        assertTrue("foo option missing", s.toLowerCase().indexOf("foo") != -1);
-        assertTrue("bar option missing", s.toLowerCase().indexOf("bar") != -1);
+        assertTrue("foo option missing", s.toLowerCase().contains("foo"));
+        assertTrue("bar option missing", s.toLowerCase().contains("bar"));
     }
 
     @Test



Mime
View raw message