語言

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 物件。

適用於