示例#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", "****"));
 }