* 测试创建用户,使用错误的登录名.
*/
@Test
public void createUserWithInvalidLoginName() {
User user = UserData.randomUser();
UserDTO userDTO = BeanMapper.map(user, UserDTO.class);
// 登录名为空
userDTO.setLoginName(null);
IdResult response = accountWebServiceClient.createUser(userDTO);
assertThat(response.getCode()).isEqualTo(WSResult.PARAMETER_ERROR);
// 登录名重复
userDTO.setLoginName("user");
response = accountWebServiceClient.createUser(userDTO);
assertThat(response.getCode()).isEqualTo(WSResult.PARAMETER_ERROR);
}