@Test @DataSet("BaobaoTao.DataSet.xls") public void makeDigestTopic()throws Exception { forumService.makeDigestTopic(1); User userDb = userService.getUserByUserName("tom"); Topic topicDb = forumService.getTopicByTopicId(1); assertThat(userDb.getCredit(), equalTo(200)); assertThat(topicDb.getDigest(), equalTo(Topic.DIGEST_TOPIC)); }
public void makeDigestTopic(int topicId){ Topic topic = topicDao.get(topicId); topic.setDigest(Topic.DIGEST_TOPIC); User user = topic.getUser(); user.setCredit(user.getCredit() + 100); }
ForumService { public void makeDigestTopic(int topicId){ Topic topic = topicDao.get(topicId); topic.setDigest(Topic.DIGEST_TOPIC); User user = topic.getUser(); user.setCredit(user.getCredit() + 100); } }
ForumService { public void makeDigestTopic(int topicId){ Topic topic = topicDao.get(topicId); topic.setDigest(Topic.DIGEST_TOPIC); User user = topic.getUser(); user.setCredit(user.getCredit() + 100); }  }
ForumService { public void makeDigestTopic(int topicId){ Topic topic = topicDao.get(topicId); topic.setDigest(Topic.DIGEST_TOPIC); User user = topic.getUser(); user.setCredit(user.getCredit() + 100); }  void addTopic(Topic topic); void removeTopic(int topicId); void addPost(Post post); void removePost(int postId); void addBoard(Board board); void removeBoard(int boardId); void makeDigestTopic(int topicId); List<Board> getAllBoards(); Page getPagedTopics(int boardId,int pageNo,int pageSize); Page getPagedPosts(int topicId,int pageNo,int pageSize); Page queryTopicByTitle(String title,int pageNo,int pageSize); Board getBoardById(int boardId); Topic getTopicByTopicId(int topicId); Post getPostByPostId(int postId); void addBoardManager(int boardId,String userName); void updateTopic(Topic topic); void updatePost(Post post); }
ForumService { public void makeDigestTopic(int topicId){ Topic topic = topicDao.get(topicId); topic.setDigest(Topic.DIGEST_TOPIC); User user = topic.getUser(); user.setCredit(user.getCredit() + 100); }  void addTopic(Topic topic); void removeTopic(int topicId); void addPost(Post post); void removePost(int postId); void addBoard(Board board); void removeBoard(int boardId); void makeDigestTopic(int topicId); List<Board> getAllBoards(); Page getPagedTopics(int boardId,int pageNo,int pageSize); Page getPagedPosts(int topicId,int pageNo,int pageSize); Page queryTopicByTitle(String title,int pageNo,int pageSize); Board getBoardById(int boardId); Topic getTopicByTopicId(int topicId); Post getPostByPostId(int postId); void addBoardManager(int boardId,String userName); void updateTopic(Topic topic); void updatePost(Post post);  }