TestFlow.AssertReply Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AssertReply(IActivity, String, UInt32) |
Adds an assertion that the turn processing logic responds as expected. |
AssertReply(Action<IActivity>, String, UInt32) |
Adds an assertion that the turn processing logic responds as expected. |
AssertReply(String, String, UInt32) |
Adds an assertion that the turn processing logic responds as expected. |
AssertReply(IActivity, IEqualityComparer<IActivity>, String, UInt32) |
Adds an assertion that the turn processing logic responds as expected. |
AssertReply(IActivity, String, UInt32)
Adds an assertion that the turn processing logic responds as expected.
public Microsoft.Bot.Builder.Adapters.TestFlow AssertReply (Microsoft.Bot.Schema.IActivity expected, string description = default, uint timeout = 3000);
member this.AssertReply : Microsoft.Bot.Schema.IActivity * string * uint32 -> Microsoft.Bot.Builder.Adapters.TestFlow
Public Function AssertReply (expected As IActivity, Optional description As String = Nothing, Optional timeout As UInteger = 3000) As TestFlow
Parameters
- expected
- IActivity
The expected activity from the bot.
- description
- String
A message to send if the actual response is not as expected.
- timeout
- UInt32
The amount of time in milliseconds within which a response is expected.
Returns
A new TestFlow object that appends this assertion to the modeled exchange.
Exceptions
The bot did not respond as expected.
Remarks
This method does not modify the original TestFlow object.
Applies to
AssertReply(Action<IActivity>, String, UInt32)
Adds an assertion that the turn processing logic responds as expected.
public Microsoft.Bot.Builder.Adapters.TestFlow AssertReply (Action<Microsoft.Bot.Schema.IActivity> validateActivity, string description = default, uint timeout = 3000);
member this.AssertReply : Action<Microsoft.Bot.Schema.IActivity> * string * uint32 -> Microsoft.Bot.Builder.Adapters.TestFlow
Public Function AssertReply (validateActivity As Action(Of IActivity), Optional description As String = Nothing, Optional timeout As UInteger = 3000) As TestFlow
Parameters
A validation method to apply to an activity from the bot. This activity should throw an exception if validation fails.
- description
- String
A message to send if the actual response is not as expected.
- timeout
- UInt32
The amount of time in milliseconds within which a response is expected.
Returns
A new TestFlow object that appends this assertion to the modeled exchange.
Remarks
This method does not modify the original TestFlow object.
Applies to
AssertReply(String, String, UInt32)
Adds an assertion that the turn processing logic responds as expected.
public Microsoft.Bot.Builder.Adapters.TestFlow AssertReply (string expected, string description = default, uint timeout = 3000);
member this.AssertReply : string * string * uint32 -> Microsoft.Bot.Builder.Adapters.TestFlow
Public Function AssertReply (expected As String, Optional description As String = Nothing, Optional timeout As UInteger = 3000) As TestFlow
Parameters
- expected
- String
The expected text of a message from the bot.
- description
- String
A message to send if the actual response is not as expected.
- timeout
- UInt32
The amount of time in milliseconds within which a response is expected.
Returns
A new TestFlow object that appends this assertion to the modeled exchange.
Exceptions
The bot did not respond as expected.
Remarks
This method does not modify the original TestFlow object.
Applies to
AssertReply(IActivity, IEqualityComparer<IActivity>, String, UInt32)
Adds an assertion that the turn processing logic responds as expected.
public Microsoft.Bot.Builder.Adapters.TestFlow AssertReply (Microsoft.Bot.Schema.IActivity expected, System.Collections.Generic.IEqualityComparer<Microsoft.Bot.Schema.IActivity> equalityComparer, string description = default, uint timeout = 3000);
member this.AssertReply : Microsoft.Bot.Schema.IActivity * System.Collections.Generic.IEqualityComparer<Microsoft.Bot.Schema.IActivity> * string * uint32 -> Microsoft.Bot.Builder.Adapters.TestFlow
Public Function AssertReply (expected As IActivity, equalityComparer As IEqualityComparer(Of IActivity), Optional description As String = Nothing, Optional timeout As UInteger = 3000) As TestFlow
Parameters
- expected
- IActivity
The expected activity from the bot.
- equalityComparer
- IEqualityComparer<IActivity>
The equality parameter which compares two activities.
- description
- String
A message to send if the actual response is not as expected.
- timeout
- UInt32
The amount of time in milliseconds within which a response is expected.
Returns
A new TestFlow object that appends this assertion to the modeled exchange.
Exceptions
The bot did not respond as expected.
Remarks
This method does not modify the original TestFlow object.