@Test @DataSet({"EmptyViewSpace.xls","EmptyViewPoint.xls"}) public void testAddViewSpace()throws Exception{ ViewSpace viewSpace = XlsDataSetBeanFactory.createBean(ViewSpaceServiceTest.class, "AddViewSpace.xls", "t_view_space", ViewSpace.class); assertNotNull(viewSpace); viewSpaceService.addViewSpace(viewSpace); ViewSpace viewSpaceDB = viewSpaceService.getFullViewSpace(viewSpace.getSpaceId()); assertNotNull(viewSpaceDB); assertEquals(viewSpace,viewSpaceDB); }
public void addViewSpace(ViewSpace viewSpace) { viewSpaceDao.save(viewSpace); }
ViewSpaceService { public void addViewSpace(ViewSpace viewSpace) { viewSpaceDao.save(viewSpace); } }
ViewSpaceService { public void addViewSpace(ViewSpace viewSpace) { viewSpaceDao.save(viewSpace); }  }
ViewSpaceService { public void addViewSpace(ViewSpace viewSpace) { viewSpaceDao.save(viewSpace); }  void addViewSpace(ViewSpace viewSpace); void deleteViewSpace(int spaceId); void updateViewSpace(ViewSpace viewSpace); List<ViewSpace> queryViewSpaceByName(String name); List<ViewSpace> queryViewSpaceByUserId(int userId); List<ViewSpace> getAllViewSpaces(); ViewSpace getFullViewSpace(int spaceId); ViewSpace getViewSpace(int spaceId); void addCommentLog(CommentLog commentLog); List<CommentLog> getCommentLogBySpaceId(int spaceId); void addViewPoint(ViewPoint viewPoint); ViewPoint getFullViewPoint(int pointId); void deleteViewPoint(int pointId); void updateViewPoint(ViewPoint viewPoint); void setViewSpaceDao(ViewSpaceDao viewSpaceDao); void setViewPointDao(ViewPointDao viewPointDao); void setCommentLogDao(CommentLogDao commentLogDao); }
ViewSpaceService { public void addViewSpace(ViewSpace viewSpace) { viewSpaceDao.save(viewSpace); }  void addViewSpace(ViewSpace viewSpace); void deleteViewSpace(int spaceId); void updateViewSpace(ViewSpace viewSpace); List<ViewSpace> queryViewSpaceByName(String name); List<ViewSpace> queryViewSpaceByUserId(int userId); List<ViewSpace> getAllViewSpaces(); ViewSpace getFullViewSpace(int spaceId); ViewSpace getViewSpace(int spaceId); void addCommentLog(CommentLog commentLog); List<CommentLog> getCommentLogBySpaceId(int spaceId); void addViewPoint(ViewPoint viewPoint); ViewPoint getFullViewPoint(int pointId); void deleteViewPoint(int pointId); void updateViewPoint(ViewPoint viewPoint); void setViewSpaceDao(ViewSpaceDao viewSpaceDao); void setViewPointDao(ViewPointDao viewPointDao); void setCommentLogDao(CommentLogDao commentLogDao);  }