🆕 #252 实现图文消息留言管理的五个接口,包括标记及取消评论为精选、删除评论、添加及删除回复等接口

This commit is contained in:
Binary Wang
2020-02-16 16:02:36 +08:00
parent 94064752ab
commit f90f4540d7
4 changed files with 150 additions and 3 deletions

View File

@@ -9,9 +9,7 @@ import me.chanjar.weixin.mp.bean.comment.WxMpCommentListVo;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
import static me.chanjar.weixin.mp.enums.WxMpApiUrl.Comment.LIST;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.spy;
@@ -74,4 +72,29 @@ public class WxMpCommentServiceImplTest {
assertThat(commentListVo.getComment().get(0).getReply()).isNotNull();
}
@Test
public void testMarkElect() throws WxErrorException {
this.wxService.getCommentService().markElect("1000000001", null, 1L);
}
@Test
public void testUnmarkElect() throws WxErrorException {
this.wxService.getCommentService().unmarkElect("1000000001", null, 1L);
}
@Test
public void testDelete() throws WxErrorException {
this.wxService.getCommentService().delete("1000000001", null, 1L);
}
@Test
public void testReplyAdd() throws WxErrorException {
this.wxService.getCommentService().replyAdd("1000000001", null, 1L, "haha");
}
@Test
public void testReplyADelete() throws WxErrorException {
this.wxService.getCommentService().replyDelete("1000000001", null, 1L);
}
}