Exemplo n.º 1
0
        public void Load_All_Directory_With_Extension_Specify()
        {
            var rs = new RiveScript(true);

            var result = rs.loadDirectory("TestData", new[] { ".rs" });
            Assert.IsTrue(result);

            rs.sortReplies();

            rs.reply("trigger1").AssertAreEqual("reply1");//.rs
            rs.reply("trigger2").AssertAreNotEqual("reply2"); //.rive
            rs.reply("trigger3").AssertAreNotEqual("reply3"); //.txt
            rs.reply("trigger4").AssertAreEqual("reply4");//.rs
        }
Exemplo n.º 2
0
        public void Load_All_Directory_No_Extension_Specify()
        {
            var rs = new RiveScript(true);

            var result = rs.loadDirectory("TestData");
            Assert.IsTrue(result);

            rs.sortReplies();

            rs.reply("trigger1").AssertAreEqual("reply1");
            rs.reply("trigger2").AssertAreEqual("reply2");
            rs.reply("trigger4").AssertAreEqual("reply4");//Inner folder
            rs.reply("trigger3").AssertAreNotEqual("reply3"); //Non-common extension
        }
Exemplo n.º 3
0
        public void Load_All_Directory_With_Extension_Specify()
        {
            var rs = new RiveScript(true);

            var result = rs.loadDirectory("TestData", new[] { ".rs" });

            Assert.IsTrue(result);

            rs.sortReplies();

            rs.reply("trigger1").AssertAreEqual("reply1");    //.rs
            rs.reply("trigger2").AssertAreNotEqual("reply2"); //.rive
            rs.reply("trigger3").AssertAreNotEqual("reply3"); //.txt
            rs.reply("trigger4").AssertAreEqual("reply4");    //.rs
        }
Exemplo n.º 4
0
        public void Load_All_Directory_No_Extension_Specify()
        {
            var rs = new RiveScript(true);

            var result = rs.loadDirectory("TestData");

            Assert.IsTrue(result);

            rs.sortReplies();

            rs.reply("trigger1").AssertAreEqual("reply1");
            rs.reply("trigger2").AssertAreEqual("reply2");
            rs.reply("trigger4").AssertAreEqual("reply4");    //Inner folder
            rs.reply("trigger3").AssertAreNotEqual("reply3"); //Non-common extension
        }