Communication - Refactor Chat Tests to use StepVerifier#16601
Communication - Refactor Chat Tests to use StepVerifier#16601minnieliu merged 4 commits intoAzure:masterfrom
Conversation
|
/azp run java - communication - ci |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
LGTM 👍🏻 |
| // Arrange | ||
| CreateChatThreadOptions threadRequest = ChatOptionsProvider.createThreadOptions( | ||
| firstThreadMember.getId(), secondThreadMember.getId()); | ||
| ChatThreadAsyncClient chatThreadClient = client.createChatThread(threadRequest).block(); |
There was a problem hiding this comment.
still need to remove this block. It's what I was asking Srikanta about during the tutorial. Let me find his answer about how to do it
There was a problem hiding this comment.
"What if we need to set up/create an object on the service first (as part of the arrange), before acting on it? Do we initialize the sync client too, and use it to arrange the setup? Or do we use a multi…"
you can chain multiple service calls asynchronously through Reactor operators like then().. so, the first call will do the necessary setup on the service and then call the next method that you want to test
| // Arrange | ||
| SendChatMessageOptions messageRequest = ChatOptionsProvider.sendMessageOptions(); | ||
|
|
||
| SendChatMessageResult response = chatThreadClient.sendMessage(messageRequest).block(); |
There was a problem hiding this comment.
Same comment here, need to get rid of this .block() too
angiurgiu
left a comment
There was a problem hiding this comment.
Looks good now. Thanks for improving the tests!
No description provided.