Ejemplo n.º 1
0
 @Test
 public void updateArticle() {
   Article article = new Article();
   article.setContext("妞晚安");
   article.setId(1);
   article.setStatus(1);
   article.setComment_number(1);
   articleService.updateArticle(article);
 }
Ejemplo n.º 2
0
 @Test
 public void addArticle() {
   Article article = new Article();
   Category category = new Category();
   category.setId(1);
   article.setStatus(1);
   article.setCategory(category);
   article.setTitle("测试标题啊1");
   article.setContext("添加一个测试数据");
   article.setCreate_time(new Date());
   User user = new User();
   user.setId(1);
   article.setUser(user);
   boolean flag = articleService.addArticle(article);
   System.out.println(flag);
 }