예제 #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
        }
예제 #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
        }
예제 #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
        }
예제 #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
        }