package enterprise.web.tookit.account.test;
import javax.naming.InitialContext;
import enterprise.web.tookit.user.User;
import enterprise.web.tookit.user.UserBeanRemote;
public class UserTest {
public static void main(String[] args) {
// usernameExistTest();
// createUserRegis();
recoverPassword();
}
public static void recoverPassword() {
try {
InitialContext context = new InitialContext();
UserBeanRemote userBean = (UserBeanRemote) context.lookup("ejb/UserBean");
userBean.recoverPassword("milena");
} catch (Exception e) {
e.printStackTrace();
}
}
public static void createUserRegis() {
try {
InitialContext context = new InitialContext();
UserBeanRemote userBean = (UserBeanRemote) context.lookup("ejb/UserBean");
User user = new User();
user.setUserName("Milena Test");
user.setUserPassword("s2s2");
userBean.createUser(user);
} catch (Exception e) {
e.printStackTrace();
}
}
public static void usernameExistTest() {
try {
InitialContext context = new InitialContext();
UserBeanRemote userBean = (UserBeanRemote) context.lookup("ejb/UserBean");
//System.out.println(userBean.usernameExist("regisrocha"));
/**
*
* QUNADO VERIFICAR LOGIN ADICIONAR ICON DE CHECK_OK
*
* DEPOIS CRIAR USER
*
* CRIAR DIV AGUARDE
*
*
*
*/
} catch (Exception e) {
e.printStackTrace();
}
}
}