Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.maluc.user;
- import java.sql.SQLException;
- public class UserStatementsProvider {
- public static final String TEST_LOGIN = "login123";
- public static final String TEST_PASSWORD = "password123";
- public static final String TEST_EMAIL = "email@email.com";
- public static final String TEST_NAME = "Janusz";
- public static final String TEST_SURNAME = "Nosacz";
- public static final String TEST_PHONE_NUMBER = "123456789";
- public static void createUser() throws SQLException {
- User user = new User().builder()
- .login(TEST_LOGIN)
- .password(TEST_PASSWORD)
- .email(TEST_EMAIL)
- .name(TEST_NAME)
- .surname(TEST_SURNAME)
- .phoneNumber(TEST_PHONE_NUMBER)
- .build();
- UserRepo userRepo = new UserRepoImpl();
- userRepo.save(user);
- }
- public static void deleteUser() throws SQLException {
- UserRepo userRepo = new UserRepoImpl();
- userRepo.deleteUserByLogin(TEST_LOGIN);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement