Merge pull request #1008 from Saron123456/v5-dev

多个字段是否全部不为空
This commit is contained in:
Golden Looly 2020-08-07 17:43:50 +08:00 committed by GitHub
commit 4d9b19ab26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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));
}
}