From 0606fab3703aa922c976231967dd3750b4f6a075 Mon Sep 17 00:00:00 2001 From: "chen.ma" Date: Sun, 4 Sep 2022 21:24:39 +0800 Subject: [PATCH] Add unit test cases --- .../hippo4j/common/toolkit/JSONUtilTest.java | 3 --- .../hippo4j/common/toolkit/Md5UtilTest.java | 21 ++++++++++++++++++ .../common/toolkit/ReflectUtilTest.java | 22 +++++++++++++++++++ .../hippo4j/common/toolkit/SingletonTest.java | 21 ++++++++++++++++++ .../common/toolkit/StringUtilTest.java | 21 ++++++++++++++++++ .../common/toolkit/ThreadUtilTest.java | 21 ++++++++++++++++++ .../common/toolkit/UserContextTest.java | 21 ++++++++++++++++++ 7 files changed, 127 insertions(+), 3 deletions(-) create mode 100644 hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/Md5UtilTest.java create mode 100644 hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/ReflectUtilTest.java create mode 100644 hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/SingletonTest.java create mode 100644 hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/StringUtilTest.java create mode 100644 hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/ThreadUtilTest.java create mode 100644 hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/UserContextTest.java diff --git a/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/JSONUtilTest.java b/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/JSONUtilTest.java index a0170f22..d52a684f 100644 --- a/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/JSONUtilTest.java +++ b/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/JSONUtilTest.java @@ -28,9 +28,6 @@ import org.junit.Test; import java.util.Arrays; import java.util.List; -/** - * JSON util test. - */ public class JSONUtilTest { private static final Foo EXPECTED_FOO = new Foo(1, "foo1", new Foo(2, "foo2", null)); diff --git a/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/Md5UtilTest.java b/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/Md5UtilTest.java new file mode 100644 index 00000000..a6944f49 --- /dev/null +++ b/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/Md5UtilTest.java @@ -0,0 +1,21 @@ +/* + * 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 cn.hippo4j.common.toolkit; + +public class Md5UtilTest { +} diff --git a/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/ReflectUtilTest.java b/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/ReflectUtilTest.java new file mode 100644 index 00000000..ccc9e94f --- /dev/null +++ b/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/ReflectUtilTest.java @@ -0,0 +1,22 @@ +/* + * 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 cn.hippo4j.common.toolkit; + +public class ReflectUtilTest { + +} diff --git a/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/SingletonTest.java b/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/SingletonTest.java new file mode 100644 index 00000000..d546b3cb --- /dev/null +++ b/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/SingletonTest.java @@ -0,0 +1,21 @@ +/* + * 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 cn.hippo4j.common.toolkit; + +public class SingletonTest { +} diff --git a/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/StringUtilTest.java b/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/StringUtilTest.java new file mode 100644 index 00000000..45c2e8f9 --- /dev/null +++ b/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/StringUtilTest.java @@ -0,0 +1,21 @@ +/* + * 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 cn.hippo4j.common.toolkit; + +public class StringUtilTest { +} diff --git a/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/ThreadUtilTest.java b/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/ThreadUtilTest.java new file mode 100644 index 00000000..f6d809cd --- /dev/null +++ b/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/ThreadUtilTest.java @@ -0,0 +1,21 @@ +/* + * 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 cn.hippo4j.common.toolkit; + +public class ThreadUtilTest { +} diff --git a/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/UserContextTest.java b/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/UserContextTest.java new file mode 100644 index 00000000..f5c4652b --- /dev/null +++ b/hippo4j-common/src/test/java/cn/hippo4j/common/toolkit/UserContextTest.java @@ -0,0 +1,21 @@ +/* + * 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 cn.hippo4j.common.toolkit; + +public class UserContextTest { +}