@Test public void testGetUser() { UserDAO dao = new UserDAO(); User user = dao.getUserByName("cyclops"); System.out.println("user: "******" " + user.getUserId()); assertNotNull(user); }
@Test public void testGetUserByProject() { UserDAO dao = new UserDAO(); List<User> userByProject = dao.getUserByProject(1); for (User user : userByProject) { System.out.println(user.getUserId()); } assertNotNull(userByProject); }
@Test public void testInsertUser() { UserDAO dao = new UserDAO(); int id = dao.insert(userTest); System.out.println("insertedUser: " + id); assertTrue(id > 0); dao.delete(userTest.getUsername()); }