Exemple #1
0
        public void RemoveConversation()
        {
            RelayTwo       relay  = new RelayTwo();
            TableTwo       table  = relay.CreateTable(DialogueNode.TABLE_NAME);
            DialogueRunner runner = new DialogueRunner(relay, Language.SWEDISH);

            runner.Create <TimedDialogueNode>("Convo1", Language.SWEDISH, "Node1");
            runner.Create <TimedDialogueNode>("Convo2", Language.SWEDISH, "Node2");
            runner.Create <TimedDialogueNode>("Convo1", Language.SWEDISH, "Node3");
            runner.Create <TimedDialogueNode>("Convo2", Language.SWEDISH, "Node4");
            runner.Create <TimedDialogueNode>("Convo1", Language.SWEDISH, "Node5");
            runner.Create <TimedDialogueNode>("Convo2", Language.SWEDISH, "Node6");

            Assert.IsTrue(runner.HasConversation("Convo1"));
            Assert.IsTrue(runner.HasConversation("Convo2"));
            Assert.AreEqual(6, table.GetRows().Length);

            runner.RemoveConversation("Convo1");

            Assert.IsFalse(runner.HasConversation("Convo1"));
            Assert.IsTrue(runner.HasConversation("Convo2"));
            Assert.AreEqual(3, table.GetRows().Length);
        }
Exemple #2
0
        public void RemoveConversation()
        {
            RelayTwo relay = new RelayTwo();
            TableTwo table = relay.CreateTable(DialogueNode.TABLE_NAME);
            DialogueRunner runner = new DialogueRunner(relay, Language.SWEDISH);

            runner.Create<TimedDialogueNode>("Convo1", Language.SWEDISH, "Node1");
            runner.Create<TimedDialogueNode>("Convo2", Language.SWEDISH, "Node2");
            runner.Create<TimedDialogueNode>("Convo1", Language.SWEDISH, "Node3");
            runner.Create<TimedDialogueNode>("Convo2", Language.SWEDISH, "Node4");
            runner.Create<TimedDialogueNode>("Convo1", Language.SWEDISH, "Node5");
            runner.Create<TimedDialogueNode>("Convo2", Language.SWEDISH, "Node6");

            Assert.IsTrue(runner.HasConversation("Convo1"));
            Assert.IsTrue(runner.HasConversation("Convo2"));
            Assert.AreEqual(6, table.GetRows().Length);

            runner.RemoveConversation("Convo1");

            Assert.IsFalse(runner.HasConversation("Convo1"));
            Assert.IsTrue(runner.HasConversation("Convo2"));
            Assert.AreEqual(3, table.GetRows().Length);
        }