From f172ee1a837c8be48309215e20f7d834a21c14eb Mon Sep 17 00:00:00 2001 From: wulingxiao <1251605638@qqcom> Date: Sat, 20 Aug 2022 18:14:13 +0800 Subject: [PATCH] feature:add config module test --- .../spring/annotation/SpringValueProcessorTest.java | 11 ++++++----- .../config/spring/property/PlaceholderHelperTest.java | 3 +-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/spring/annotation/SpringValueProcessorTest.java b/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/spring/annotation/SpringValueProcessorTest.java index 8ba31ffb2..fb57206bb 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/spring/annotation/SpringValueProcessorTest.java +++ b/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/spring/annotation/SpringValueProcessorTest.java @@ -18,6 +18,11 @@ package com.tencent.cloud.polaris.config.spring.annotation; +import java.lang.reflect.Method; +import java.util.Collection; +import java.util.Objects; +import java.util.Optional; + import com.tencent.cloud.polaris.config.PolarisConfigBootstrapAutoConfiguration; import com.tencent.cloud.polaris.config.enums.RefreshType; import com.tencent.cloud.polaris.config.spring.property.SpringValue; @@ -25,6 +30,7 @@ import com.tencent.cloud.polaris.config.spring.property.SpringValueRegistry; import com.tencent.polaris.api.utils.CollectionUtils; import org.junit.Assert; import org.junit.Test; + import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -35,11 +41,6 @@ import org.springframework.cloud.autoconfigure.RefreshAutoConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.stereotype.Component; -import java.lang.reflect.Method; -import java.util.Collection; -import java.util.Objects; -import java.util.Optional; - /** * Test for {@link SpringValueProcessor}. * diff --git a/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/spring/property/PlaceholderHelperTest.java b/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/spring/property/PlaceholderHelperTest.java index 8f9155504..a605dda88 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/spring/property/PlaceholderHelperTest.java +++ b/spring-cloud-starter-tencent-polaris-config/src/test/java/com/tencent/cloud/polaris/config/spring/property/PlaceholderHelperTest.java @@ -24,7 +24,6 @@ import com.tencent.polaris.api.utils.CollectionUtils; import org.junit.Assert; import org.junit.Test; - /** * Test for {@link PlaceholderHelper}. * @@ -72,7 +71,7 @@ public class PlaceholderHelperTest { } @Test - public void extractIllegalPlaceholderKeysTest(){ + public void extractIllegalPlaceholderKeysTest() { final String placeholderCase = "${some.key"; final String placeholderCase1 = "{some.key}"; final String placeholderCase2 = "some.key";