@Test public void getAllThreads() { List<Thread> threads = cs.getAllThreads(2); for (Thread t : threads) { System.out.println(t.getThreadTitle()); } }
@Test public void getAllCategory() { List<Category> css = cs.getAll(); for (Category c : css) { System.out.println(c.getCategoryName()); } }
/** 取得所有的东西 */ @Test public void getAllThing() { List<Thread> threads = cs.getAllThreads(2); for (Thread t : threads) { System.out.println("Thread : " + t.getThreadTitle()); List<Post> posts = ts.getAllPosts(t.getThreadId()); for (Post p : posts) { System.out.println(">>>>Post : " + p.getPostContent()); List<Comment> comments = ps.getAllComments(p.getPostId()); for (Comment cm : comments) { System.out.println(">>>>>>>>Comment : " + cm.getCommentContent()); } } } }
@Test public void delete() { cs.delete(1); }
@Test public void addCategory() { cs.add(new Category("陆地区")); }