@Test
public void sendMessage() throws IOException {
server.setDispatcher(new Dispatcher() {
@Override
public MockResponse dispatch(RecordedRequest request) throws InterruptedException {
final String body = request.getBody().readUtf8();
receivedNotification = JacksonUtils.deserialize(body, Notification.class);
return new MockResponse();
}
});
server.start();
final RoomApiHttp http = getRoomApi(server, (oauthId, oauthSecret) -> getValidOAuthToken());
http.sendMessage("hello", null);
assertThat(receivedNotification, is(new Notification("hello", null)));
}
RoomApiTest.java 文件源码
java
阅读 52
收藏 0
点赞 0
评论 0
项目:lazybot
作者:
评论列表
文章目录