Exemple #1
0
        public void MainDialog_child_dialog_failure()
        {
            var fluentTest = new MainDialogFluentTest(false);

            fluentTest.Create()
            .Message(m =>
            {
                Assert.AreEqual(2, m.Count);

                //Ensure that the main dialog forwards its operation to the fake child dialog,
                //and that the message returned from that child dialog is routed back to the user.
                Assert.AreEqual("Hello, you have now reached the SampleChatbot.", m[0].Text);
                Assert.AreEqual("The child dialog failed", m[1].Text);
            });
        }
Exemple #2
0
        public void MainDialog_happy_path()
        {
            var fluentTest = new MainDialogFluentTest();

            fluentTest.Create()
            .Message(m =>
            {
                Assert.AreEqual(2, m.Count);

                //Ensure that the main dialog forwards its operation to the fake child dialog,
                //and that the message returned from that child dialog is routed back to the user.
                Assert.AreEqual("Hello, you have now reached the SampleChatbot.", m[0].Text);
                Assert.AreEqual("Congratulations, you picked the correct number.", m[1].Text);
            });
        }