parent
66b65ed0f2
commit
3e5f642c3b
|
@ -1,5 +1,6 @@
|
||||||
package com.dispose.config;
|
package com.dispose.config;
|
||||||
|
|
||||||
|
import com.dispose.Global.InitTestEnvironment;
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
@ -19,13 +20,20 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@SpringBootTest
|
@SpringBootTest
|
||||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||||
public class DisposeConfigureTest {
|
public class DisposeConfigureTest extends InitTestEnvironment {
|
||||||
/**
|
/**
|
||||||
* The Dispose configure.
|
* The Dispose configure.
|
||||||
*/
|
*/
|
||||||
@Resource
|
@Resource
|
||||||
private DisposeConfigure disposeConfigure;
|
private DisposeConfigure disposeConfigure;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User login.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void userLogin() {
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* T 1 dispose cfg test.
|
* T 1 dispose cfg test.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.dispose.config;
|
package com.dispose.config;
|
||||||
|
|
||||||
|
import com.dispose.Global.InitTestEnvironment;
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
@ -19,13 +20,20 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@SpringBootTest
|
@SpringBootTest
|
||||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||||
public class MyConfigTest {
|
public class MyConfigTest extends InitTestEnvironment {
|
||||||
/**
|
/**
|
||||||
* The My config.
|
* The My config.
|
||||||
*/
|
*/
|
||||||
@Resource
|
@Resource
|
||||||
private MyConfig myConfig;
|
private MyConfig myConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User login.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void userLogin() {
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* T 1 my config test.
|
* T 1 my config test.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.dispose.exception;
|
package com.dispose.exception;
|
||||||
|
|
||||||
|
import com.dispose.Global.InitTestEnvironment;
|
||||||
import com.dispose.common.ConstValue;
|
import com.dispose.common.ConstValue;
|
||||||
import com.dispose.pojo.dto.ProtocolReqDTO;
|
import com.dispose.pojo.dto.ProtocolReqDTO;
|
||||||
import com.dispose.pojo.vo.auth.LoginReq;
|
import com.dispose.pojo.vo.auth.LoginReq;
|
||||||
|
@ -29,7 +30,14 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||||
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
|
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class ExceptionTest {
|
public class ExceptionTest extends InitTestEnvironment {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User login.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void userLogin() { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Expected ex.
|
* The Expected ex.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -54,6 +54,9 @@ public class UserAccountManagerTest extends InitTestEnvironment {
|
||||||
|
|
||||||
Assert.assertNotNull(userToken);
|
Assert.assertNotNull(userToken);
|
||||||
Assert.assertNotEquals(userToken.length(), 0);
|
Assert.assertNotEquals(userToken.length(), 0);
|
||||||
|
ret = userAccountService.loginService("xajhuang", "123456");
|
||||||
|
|
||||||
|
Assert.assertNotEquals(ret.getFirstParam(), ErrorCode.ERR_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue