ProjectIbatisDao extends SqlMapClientDaoSupport implements ProjectDao { @SuppressWarnings("unchecked") @Override public List<Team> getTeams() { return getSqlMapClientTemplate().queryForList("Project.getTeams"); }  @SuppressWarnings("unchecked") @Override List<Team> getTeams(); @SuppressWarnings("unchecked") @Override List<Project> getProjects(); @Override Project getProject(int projectId); @Override Project findProject(String name); @Override void lockProject(int projectId); @SuppressWarnings({ "unchecked", "rawtypes" }) @Override List<Project> getProjectsByTeamAndProduct(Map param); @Override Integer insertProject(Project project); @Override Integer updateProject(Project project); @Override Integer delProject(int projectId); @SuppressWarnings("unchecked") @Override List<Project> getProjectsByProduct(int productId); @Override boolean isMember(int projectId, int userId); @SuppressWarnings("unchecked") @Override List<ProjectMember> getMembers(int projectId); @SuppressWarnings("unchecked") @Override List<ProjectMember> getOwners(int projectId); @SuppressWarnings("unchecked") @Override List<ProjectMember> getOperators(int projectId); @Override void addOwner(int projectId, int userId); @Override void addMember(int projectId, int userId); @Override void addOperator(int projectId, int userId); @Override void deleteOwner(int projectId, int userId); @Override void deleteMember(int projectId, int userId); @Override void deleteOperator(int projectId, int userId); @Override Project getProjectExtra(int projectId);  }
@Test @Ignore public void testGetTeams() { List<Team> teams = projectDao.getTeams(); Assert.assertEquals(4, teams.size()); Team team = teams.get(0); Assert.assertEquals("主站", team.getName()); List<Product> products = team.getProducts(); Assert.assertEquals(4, products.size()); Product product = products.get(0); Assert.assertEquals("商户", product.getName()); List<Project> projects = product.getProjects(); Assert.assertEquals(7, projects.size()); Project project = projects.get(0); Assert.assertEquals("shop-web", project.getName()); project = projects.get(1); Assert.assertEquals("shop-service", project.getName()); }