Skip to content

Commit 19103e6

Browse files
committed
test(assistant-v2): update ITs
1 parent 2d88849 commit 19103e6

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

Tests/AssistantV2IntegrationTests.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,42 @@ public IEnumerator TestListLogs()
297297
yield return null;
298298
}
299299

300+
[UnityTest, Order(2)]
301+
public IEnumerator TestRuntimeResponseGenericRuntimeResponseTypeChannelTransfer()
302+
{
303+
assistantId = Environment.GetEnvironmentVariable("ASSISTANT_ASSISTANT_ID");
304+
MessageResponseStateless messageResponse = null;
305+
string conversationId = null;
306+
307+
service.WithHeader("X-Watson-Test", "1");
308+
MessageInputStateless input = new MessageInputStateless();
309+
310+
input.Text = "test sdk";
311+
input.MessageType = MessageInputStateless.MessageTypeValue.TEXT;
312+
313+
Log.Debug("AssistantV1IntegrationTests", "Attempting to Message...test sdk");
314+
service.MessageStateless(
315+
callback: (DetailedResponse<MessageResponseStateless> response, IBMError error) =>
316+
{
317+
messageResponse = response.Result;
318+
RuntimeResponseGenericRuntimeResponseTypeChannelTransfer
319+
runtimeResponseGenericRuntimeResponseTypeChannelTransfer =
320+
(RuntimeResponseGenericRuntimeResponseTypeChannelTransfer) messageResponse.Output.Generic[0];
321+
322+
ChannelTransferInfo channelTransferInfo =
323+
runtimeResponseGenericRuntimeResponseTypeChannelTransfer.TransferInfo;
324+
325+
Assert.IsNotNull(channelTransferInfo);
326+
Assert.IsNull(error);
327+
},
328+
assistantId: assistantId,
329+
input: input
330+
);
331+
332+
while (messageResponse == null)
333+
yield return null;
334+
}
335+
300336
[TearDown]
301337
public void TestTearDown() { }
302338
}

0 commit comments

Comments
 (0)