验证单声道中形成的临时电话
我有一个返回单型类型集合的课程,类似的内容,我想添加一个测试,以验证单声道在链中通过的临时调用:我的测试方法是在测试类中
@Override
public @NonNull Mono<Collection<Group>> getGroupsAsync(@NonNull String groupName,
@NonNull String name) throws MyException {
try {
return inner.networkGroups().getByGroupAsync(groupName, name)
.filter(skipNullNsg(name, groupName))
.flatMap(nsg -> Mono.just(n.groups().values()));
} catch (Exception ex) {
throw MyException(ex);
}
}
我的测试:
@Test
public void getGroups() throws MyException {
assertNotNull(inner.networkGroups().getByGroupAsync(groupName, name).block());
}
我的问题是如何能够如何我使用单声道链来检查临时状态,因为这是一个异步调用。
I have a class that returns a Mono type collection, something like this and I want to add a test that verifies the interim calls that mono goes through in chain: My method to test is in Test class
@Override
public @NonNull Mono<Collection<Group>> getGroupsAsync(@NonNull String groupName,
@NonNull String name) throws MyException {
try {
return inner.networkGroups().getByGroupAsync(groupName, name)
.filter(skipNullNsg(name, groupName))
.flatMap(nsg -> Mono.just(n.groups().values()));
} catch (Exception ex) {
throw MyException(ex);
}
}
My test is:
@Test
public void getGroups() throws MyException {
assertNotNull(inner.networkGroups().getByGroupAsync(groupName, name).block());
}
My question is how can I use the chain of mono to check the interim states as this is an async call.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论