set of possible responses, chosen at random. If the collection size is 1, then there is only one response that is expected
routes the outgoingMessage to the proper comparison method based on the expectedResponseCollection. This switch based method exists due to typescript's lack of polymorphism support.
outgoing message that is being compared
Asserts that outgoingMessage.text is within the expectedResponseStrings collection
outgoing message being compared
collection of possible string values for comparison
Assumes the expectedResponseCollection are regexs. Asserts that outgoingMessage.text matches at least of the regexs in expectedResponseCollection
outgoing message being compared
Assumes the expectedResponseCollection is an IMessage[]. Asserts that at least one IMessage in expectedResponseCollection is fully contained within the outgoingMessage (i.e. the outgoingMessage {type: 'message', text:'hello'}) would be matched successfully against {type: 'message', text: 'hello', user: { id: user1 }} because the outgoing message is contained within the response. It would not successfulyl be matched against {text: 'hello', user: { id: user1 }} because the expected response is missing { type: 'message' }
outgoing message being compared
Class that wraps expectedResponseCollections for comparison against an outgoing message. One instance of ExpectedMessage represents one response from the bot.