コード例 #1
0
        public async Task ShouldCheckCurrentCity()
        {
            var step1 = new BotTestCase()
            {
                Action        = "hi",
                ExpectedReply = "Welcome to the Search City bot. I'm currently configured to search for things in Seattle",
            };

            var step2 = new BotTestCase()
            {
                Action        = "Thiago",
                ExpectedReply = "Welcome Thiago!",
            };

            var step3 = new BotTestCase()
            {
                Action        = "current city",
                ExpectedReply = "Hey Thiago, I'm currently configured to search for things in Seattle.",
            };

            var steps = new List <BotTestCase> {
                step1, step2, step3
            };

            await TestRunner.RunTestCases(steps, null, 0);
        }
コード例 #2
0
        public async Task ShouldChangeCity()
        {
            var step1 = new BotTestCase()
            {
                Action        = "hi",
                ExpectedReply = "Welcome to the Search City bot. I'm currently configured to search for things in Seattle",
            };

            var step2 = new BotTestCase()
            {
                Action        = "Thiago",
                ExpectedReply = "Welcome Thiago!",
            };

            var step3 = new BotTestCase()
            {
                Action        = "change city to Portland",
                ExpectedReply = "All set Thiago. From now on, all my searches will be for things in Portland.",
            };

            var steps = new List <BotTestCase> {
                step1, step2, step3
            };

            await TestRunner.RunTestCases(steps, null, 0);
        }
コード例 #3
0
        public async Task ShouldShowWelcome()
        {
            var testCase = new BotTestCase()
            {
                Action        = "hi",
                ExpectedReply = "Welcome to the Search City bot. I'm currently configured to search for things in Seattle",
            };

            await TestRunner.RunTestCase(testCase);
        }
コード例 #4
0
 internal static async Task RunTestCases(IList <BotTestCase> steps, BotTestCase completionTestCase = null, int completionChecks = 1)
 {
     await RunTestCases(steps, new List <BotTestCase> {
         completionTestCase
     }, completionChecks);
 }
コード例 #5
0
 internal static async Task RunTestCase(BotTestCase testCase)
 {
     await RunTestCases(new List <BotTestCase> {
         testCase
     }, new List <BotTestCase>());
 }