@Test public void testCheckUserAction() throws Exception { Assert.assertEquals(true, getUserAction().checkUserInfo(user)); }
protected boolean checkUserInfo(User user) { if (StringUtils.isEmpty(user.getUserName())) { System.out.println("user name is null..."); return false; } else if (StringUtils.isEmpty(user.getPassword())) { System.out.println("password is null..."); return false; } return true; }
UserAction { protected boolean checkUserInfo(User user) { if (StringUtils.isEmpty(user.getUserName())) { System.out.println("user name is null..."); return false; } else if (StringUtils.isEmpty(user.getPassword())) { System.out.println("password is null..."); return false; } return true; } }
UserAction { protected boolean checkUserInfo(User user) { if (StringUtils.isEmpty(user.getUserName())) { System.out.println("user name is null..."); return false; } else if (StringUtils.isEmpty(user.getPassword())) { System.out.println("password is null..."); return false; } return true; }  }
UserAction { protected boolean checkUserInfo(User user) { if (StringUtils.isEmpty(user.getUserName())) { System.out.println("user name is null..."); return false; } else if (StringUtils.isEmpty(user.getPassword())) { System.out.println("password is null..."); return false; } return true; }  void addUser(User user); void addUser(String userName, String password); User getUser(int userId); void setUserService(UserService userService); }
UserAction { protected boolean checkUserInfo(User user) { if (StringUtils.isEmpty(user.getUserName())) { System.out.println("user name is null..."); return false; } else if (StringUtils.isEmpty(user.getPassword())) { System.out.println("password is null..."); return false; } return true; }  void addUser(User user); void addUser(String userName, String password); User getUser(int userId); void setUserService(UserService userService);  }