public void Substitutio_Rot13_Problem_Load_With_Duscott_Files()
        {
            var rs     = new RiveScriptEngine(Config.Debug);
            var loaded = false;

            loaded = rs.loadFile("issue-4-rot13/begin.rive");
            Assert.IsTrue(loaded);

            loaded = rs.loadFile("issue-4-rot13/main.rive");
            Assert.IsTrue(loaded);

            rs.setDebug(true);
            rs.sortReplies();


            var reply = rs.reply(USER, "he's an idiot");


            Assert.IsTrue(rs.IsErrReply(reply));
        }
Esempio n. 2
0
        public void Load_Simple_File_Non_Common_Extension()
        {
            var rs = new RiveScriptEngine(Config.Debug);

            var result = rs.loadFile("TestData/basic_reply_3.txt");

            Assert.IsTrue(result);

            rs.sortReplies();

            rs.reply("trigger3").AssertAreEqual("reply3");
        }
Esempio n. 3
0
        public void Start_Has_Work_After_Condition()
        {
            var rs     = new RiveScriptEngine(Config.DebugUTF8);
            var loaded = false;

            loaded = rs.loadFile("issue-19-start-java-version/begin.rive");
            Assert.IsTrue(loaded);

            loaded = rs.loadFile("issue-19-start-java-version/main.rive");
            Assert.IsTrue(loaded);

            rs.setDebug(true);
            rs.sortReplies();


            var reply1 = rs.reply(USER, "hi1 test");

            Assert.AreEqual("!test!", reply1);

            var reply2 = rs.reply(USER, "hi2 test");

            Assert.AreEqual("!test!", reply2);
        }