forked from JavaWebinar/masterjava
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3c103ae
commit 45fa69f
Showing
3 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ public class UserTestData { | |
public static User USER1; | ||
public static User USER2; | ||
public static User USER3; | ||
public static List<User> FIST5_USERS; | ||
public static List<User> FIRST5_USERS; | ||
|
||
public static void init() { | ||
CityTestData.init(); | ||
|
@@ -28,14 +28,14 @@ public static void init() { | |
USER1 = new User("User1", "[email protected]", UserFlag.active, MOSCOW.getRef()); | ||
USER2 = new User("User2", "[email protected]", UserFlag.active, KIEV.getRef()); | ||
USER3 = new User("User3", "[email protected]", UserFlag.active, MINSK.getRef()); | ||
FIST5_USERS = ImmutableList.of(ADMIN, DELETED, FULL_NAME, USER1, USER2); | ||
FIRST5_USERS = ImmutableList.of(ADMIN, DELETED, FULL_NAME, USER1, USER2); | ||
} | ||
|
||
public static void setUp() { | ||
UserDao dao = DBIProvider.getDao(UserDao.class); | ||
dao.clean(); | ||
DBIProvider.getDBI().useTransaction((conn, status) -> { | ||
FIST5_USERS.forEach(dao::insert); | ||
FIRST5_USERS.forEach(dao::insert); | ||
dao.insert(USER3); | ||
}); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters