From fcd5ef71fe43dc792ebe778c35eafc43eff9832d Mon Sep 17 00:00:00 2001 From: huangxin Date: Wed, 22 Apr 2020 19:41:52 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=20=E5=A2=9E=E5=8A=A0=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=202.=20=E6=BB=A1=E8=B6=B3=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81=E8=A6=86=E7=9B=96=E7=8E=87?= =?UTF-8?q?=E8=A6=81=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TestSuit/AllDisposePlatformTest.java | 2 ++ .../dispose/config/DisposeConfigureTest.java | 29 +++++++++++++++++++ .../java/com/dispose/config/MyConfigTest.java | 6 +++- .../manager/UserAccountManagerTest.java | 1 + 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 src/test/java/com/dispose/config/DisposeConfigureTest.java diff --git a/src/test/java/com/dispose/TestSuit/AllDisposePlatformTest.java b/src/test/java/com/dispose/TestSuit/AllDisposePlatformTest.java index 04f86f62..14e71173 100644 --- a/src/test/java/com/dispose/TestSuit/AllDisposePlatformTest.java +++ b/src/test/java/com/dispose/TestSuit/AllDisposePlatformTest.java @@ -1,6 +1,7 @@ package com.dispose.TestSuit; +import com.dispose.config.DisposeConfigureTest; import com.dispose.config.MyConfigTest; import com.dispose.controller.AuthControllerTest; import com.dispose.controller.DeviceNodeInfoControllerTest; @@ -21,6 +22,7 @@ import org.junit.runners.Suite; @RunWith(Suite.class) @Suite.SuiteClasses({ MyConfigTest.class, + DisposeConfigureTest.class, GetVersionTest.class, DPTechInterfaceTestCase.class, UserAccountMapperTest.class, diff --git a/src/test/java/com/dispose/config/DisposeConfigureTest.java b/src/test/java/com/dispose/config/DisposeConfigureTest.java new file mode 100644 index 00000000..297338b4 --- /dev/null +++ b/src/test/java/com/dispose/config/DisposeConfigureTest.java @@ -0,0 +1,29 @@ +package com.dispose.config; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import javax.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.junit.Assert; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.MethodSorters; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@Slf4j +@SpringBootTest +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class DisposeConfigureTest { + @Resource + private DisposeConfigure disposeConfigure; + + @Test + public void t1_disposeCfgTest() throws JsonProcessingException { + Assert.assertNotNull(disposeConfigure); + + log.info(new ObjectMapper().writeValueAsString(disposeConfigure)); + } +} diff --git a/src/test/java/com/dispose/config/MyConfigTest.java b/src/test/java/com/dispose/config/MyConfigTest.java index 85b78682..18134e03 100644 --- a/src/test/java/com/dispose/config/MyConfigTest.java +++ b/src/test/java/com/dispose/config/MyConfigTest.java @@ -1,5 +1,7 @@ package com.dispose.config; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; import javax.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.junit.Assert; @@ -19,7 +21,9 @@ public class MyConfigTest { private MyConfig myConfig; @Test - public void t1_myConfigTest() { + public void t1_myConfigTest() throws JsonProcessingException { Assert.assertNotNull(myConfig); + + log.info(new ObjectMapper().writeValueAsString(myConfig)); } } diff --git a/src/test/java/com/dispose/manager/UserAccountManagerTest.java b/src/test/java/com/dispose/manager/UserAccountManagerTest.java index 557b9665..ec0459c7 100644 --- a/src/test/java/com/dispose/manager/UserAccountManagerTest.java +++ b/src/test/java/com/dispose/manager/UserAccountManagerTest.java @@ -101,6 +101,7 @@ public class UserAccountManagerTest extends InitTestEnvironment { @Test public void t6_getUsrPwdErrTimesTest() { Assert.assertEquals(userAccountCacheManager.getUsrPwdErrTimes(getUSER_NAME()), 0); + Assert.assertEquals(userAccountCacheManager.getUsrPwdErrTimes(getUSER_NAME() + "abc"), 0); } /**