Advertisement
Guest User

Untitled

a guest
Aug 31st, 2018
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. package com.maluc.user;
  2.  
  3. import java.sql.SQLException;
  4.  
  5. public class UserStatementsProvider {
  6. public static final String TEST_LOGIN = "login123";
  7. public static final String TEST_PASSWORD = "password123";
  8. public static final String TEST_EMAIL = "email@email.com";
  9. public static final String TEST_NAME = "Janusz";
  10. public static final String TEST_SURNAME = "Nosacz";
  11. public static final String TEST_PHONE_NUMBER = "123456789";
  12.  
  13. public static void createUser() throws SQLException {
  14. User user = new User().builder()
  15. .login(TEST_LOGIN)
  16. .password(TEST_PASSWORD)
  17. .email(TEST_EMAIL)
  18. .name(TEST_NAME)
  19. .surname(TEST_SURNAME)
  20. .phoneNumber(TEST_PHONE_NUMBER)
  21. .build();
  22. UserRepo userRepo = new UserRepoImpl();
  23. userRepo.save(user);
  24. }
  25.  
  26. public static void deleteUser() throws SQLException {
  27. UserRepo userRepo = new UserRepoImpl();
  28. userRepo.deleteUserByLogin(TEST_LOGIN);
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement