Skip to content
Permalink
Browse files
Use String.contains(String) instead of checking for index
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/cli/trunk@1669815 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
britter committed Mar 28, 2015
1 parent 78e9b51 commit ce1b4d824ab36e8823819e277153d33c080ada95
Showing 1 changed file with 2 additions and 2 deletions.
@@ -147,8 +147,8 @@ public void testToString()

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

0 comments on commit ce1b4d8

Please sign in to comment.