TestFlow.AssertReplyOneOf(String[], String, UInt32) 方法

定义

添加一个断言,即机器人的响应包含在一组可接受的响应中。

public Microsoft.Bot.Builder.Adapters.TestFlow AssertReplyOneOf (string[] candidates, string description = default, uint timeout = 3000);
member this.AssertReplyOneOf : string[] * string * uint32 -> Microsoft.Bot.Builder.Adapters.TestFlow
Public Function AssertReplyOneOf (candidates As String(), Optional description As String = Nothing, Optional timeout As UInteger = 3000) As TestFlow

参数

candidates
String[]

可接受的消息集。

description
String

如果实际响应不符合预期,则发送的消息。

timeout
UInt32

预期响应的时间量(以毫秒为单位)。

返回

一个新的 TestFlow 对象,用于将此断言追加到建模交换。

例外

机器人未按预期响应。

注解

此方法不会修改原始 TestFlow 对象。

适用于