TestScript.AssertReply 方法

定义

添加一个断言,指示轮次处理逻辑按预期响应。

public Microsoft.Bot.Builder.Dialogs.Adaptive.Testing.TestScript AssertReply(string expected, string description = default, uint timeout = 3000, string[] assertions = default, string path = "", int line = 0);
member this.AssertReply : string * string * uint32 * string[] * string * int -> Microsoft.Bot.Builder.Dialogs.Adaptive.Testing.TestScript
Public Function AssertReply (expected As String, Optional description As String = Nothing, Optional timeout As UInteger = 3000, Optional assertions As String() = Nothing, Optional path As String = "", Optional line As Integer = 0) As TestScript

参数

expected
String

来自机器人的消息的预期文本。

description
String

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

timeout
UInt32

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

assertions
String[]

断言。

path
String

路径。

line
Int32

行号。

返回

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

例外

机器人未按预期响应。

注解

此方法不修改原始 TestScript 对象。

适用于