Advertisement
Guest User

Untitled

a guest
Jan 21st, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. @Test
  2. public void testNewReg() {
  3. User user = new User();
  4. // SocketCommunication socket = new SocketCommunication();
  5. PasswordHash passwordHash = new PasswordHash();
  6. user.setUsername("username");
  7. assertEquals("username", user.getUsername());
  8. String securePassword = passwordHash.hashPassword("password");
  9. user.setPassword(securePassword);
  10. assertEquals(securePassword, user.getPassword());
  11. /*try {
  12. socket.createSocket();
  13. socket.objectOutToServer("register");
  14. socket.objectOutToServer(user);
  15. socket.closeSocket();
  16. } catch (UnknownHostException e) {
  17. // TODO Auto-generated catch block
  18. e.printStackTrace();
  19. } catch (IOException e) {
  20. // TODO Auto-generated catch block
  21. e.printStackTrace();
  22. }*/
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement