コード例 #1
0
 @Test
 public void testSourcesContainsTargets() {
   String sources[] = {"one", "two", "three", "four", "five"};
   String targets1[] = {"apple", "orange", "bananna", "peach", "pear"};
   String targets2[] = {"qq", "zz", "tw", "uu", "yy"};
   assertTrue(StringUtil.contains(sources, targets2));
   assertFalse(StringUtil.contains(sources, targets1));
 }
コード例 #2
0
 @Test
 public void testSourcesContainsTarget() {
   String sources[] = {"one", "two", "three", "four", "five"};
   assertTrue(StringUtil.contains(sources, "ou"));
   assertFalse(StringUtil.contains(sources, "+"));
 }
コード例 #3
0
 @Test
 public void testSourceContainsTargets() {
   String targets[] = {"one", "two", "three", "four", "five"};
   assertTrue(StringUtil.contains("This is one fine day!", targets));
   assertFalse(StringUtil.contains("This is not a fine day!", targets));
 }
コード例 #4
0
 @Test
 public void testSourceContainsTarget() {
   assertTrue(StringUtil.contains("source-data-source", "data"));
   assertFalse(StringUtil.contains("source-data-source", "****"));
 }