package login;
|
|
/**
|
* 登录功能测试运行类
|
* 可以直接运行此类的main方法来测试登录功能
|
*/
|
public class LoginTestRunner {
|
|
public static void main(String[] args) {
|
// 测试邮箱验证码发送
|
//testSendEmailCode();
|
|
// 测试登录验证
|
testVerifyLogin();
|
|
// 测试用户注册
|
//testUserRegister();
|
|
|
}
|
|
/**
|
* 测试发送邮箱验证码
|
*/
|
private static void testSendEmailCode() {
|
// 测试正常邮箱
|
String testEmail = "979909237@qq.com";
|
|
EmailCodeSender.EmailCodeResponse response = EmailCodeSender.sendEmailCode(testEmail);
|
}
|
|
/**
|
* 测试登录验证
|
*/
|
private static void testVerifyLogin() {
|
String email = "979909237@qq.com";
|
String password = "password123";
|
|
LoginVerifier.LoginVerifyResponse response = LoginVerifier.verifyLogin(email, password);
|
}
|
|
/**
|
* 测试用户注册
|
*/
|
private static void testUserRegister() {
|
String email = "979909237@qq.com";
|
String password = "password123";
|
String code = "709212";
|
String nickname = "zshTest";
|
|
UserRegister.RegisterResponse response = UserRegister.register(email, password, code, nickname,password);
|
}
|
|
|
|
}
|