@Test public void hasMatchUser() { boolean b1 = userService.hasMatchUser("admin", "123456"); boolean b2 = userService.hasMatchUser("admin", "1111"); assertTrue(b1); assertTrue(!b2); }
public boolean hasMatchUser(String userName, String password) { int matchCount = userDao.getMatchCount(userName, password); return matchCount > 0; }
UserService { public boolean hasMatchUser(String userName, String password) { int matchCount = userDao.getMatchCount(userName, password); return matchCount > 0; } }
UserService { public boolean hasMatchUser(String userName, String password) { int matchCount = userDao.getMatchCount(userName, password); return matchCount > 0; }  }
UserService { public boolean hasMatchUser(String userName, String password) { int matchCount = userDao.getMatchCount(userName, password); return matchCount > 0; }  boolean hasMatchUser(String userName, String password); User findUserByUserName(String userName); void loginSuccess(User user); }
UserService { public boolean hasMatchUser(String userName, String password) { int matchCount = userDao.getMatchCount(userName, password); return matchCount > 0; }  boolean hasMatchUser(String userName, String password); User findUserByUserName(String userName); void loginSuccess(User user);  }