多个字段是否全部不为空

This commit is contained in:
Saron123456 2020-08-07 12:26:34 +08:00
parent f349d770e2
commit f6860cc555
2 changed files with 255 additions and 224 deletions

File diff suppressed because it is too large Load Diff

View File

@ -289,4 +289,12 @@ public class ArrayUtilTest {
final int[] ints = ArrayUtil.addAll(new int[]{1, 2, 3}, new int[]{4, 5, 6});
Assert.assertArrayEquals(new int[]{1,2,3,4,5,6}, ints);
}
@Test
public void isAllNotNullTest(){
String[] allNotNull = {"aa", "bb", "cc", "dd", "bb", "dd"};
Assert.assertTrue(ArrayUtil.isAllNotNull(allNotNull));
String[] hasNull = {"aa", "bb", "cc", null, "bb", "dd"};
Assert.assertFalse(ArrayUtil.isAllNotNull(hasNull));
}
}