From b6b8ff5c259dd7886499173b016b831421ef8fdf Mon Sep 17 00:00:00 2001 From: xiaoyu <549477611@qq.com> Date: Thu, 1 Aug 2019 15:32:24 +0800 Subject: [PATCH] add string utils test. --- .../hmily/common/utils/StringUtilsTest.java | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/hmily-common/src/test/java/org/dromara/hmily/common/utils/StringUtilsTest.java b/hmily-common/src/test/java/org/dromara/hmily/common/utils/StringUtilsTest.java index c11ca59c..d360ea81 100644 --- a/hmily-common/src/test/java/org/dromara/hmily/common/utils/StringUtilsTest.java +++ b/hmily-common/src/test/java/org/dromara/hmily/common/utils/StringUtilsTest.java @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.dromara.hmily.common.utils; import org.junit.Assert; @@ -10,7 +27,6 @@ public class StringUtilsTest { Assert.assertFalse(StringUtils.isNoneBlank((CharSequence) null)); Assert.assertFalse(StringUtils.isNoneBlank("")); Assert.assertFalse(StringUtils.isNoneBlank("", "", "")); - Assert.assertTrue(StringUtils.isNoneBlank("a", "b", "c")); } @@ -18,7 +34,6 @@ public class StringUtilsTest { public void testIsEmpty() { Assert.assertTrue(true); Assert.assertTrue(StringUtils.isEmpty(new String[0])); - Assert.assertFalse(StringUtils.isEmpty(new String[]{"a", "b", "c"})); } @@ -27,7 +42,6 @@ public class StringUtilsTest { Assert.assertTrue(StringUtils.isBlank(null)); Assert.assertTrue(StringUtils.isBlank("")); Assert.assertTrue(StringUtils.isBlank(" ")); - Assert.assertFalse(StringUtils.isBlank("foobar")); Assert.assertFalse(StringUtils.isBlank("foo bar")); }