Skip to content
This repository was archived by the owner on Jan 27, 2023. It is now read-only.
This repository was archived by the owner on Jan 27, 2023. It is now read-only.

No ability for multiple possible responses #3

Open

Description

@kbrimble

Currently all of the {Property}Matches() responses fail the test if the regex isn't matched (aside from Activity.Text).

This means that bots that have "randomised" responses cannot be tested without doing large regexes with pipes between the different things that a bot could say.

Activity

  1. anth12 commented on Jun 8, 2017

    @anth12

    @kbrimble I encountered this same conundrum and at first matched with regex | but it quickly got out of hand and is not maintainable when updating the random responses.

    For me the content is stored in a key/value store, so when the bot is chatting over direct line with unit test conversation rather than sending the random message it returns the reference key which allows for content to be updated without breaking unit tests.

    I know this isn't a direct solution as it comes with the overhead of offloading the content elsewhere but I found it a perfect solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions