Beispiel #1
0
        public void NumChoicesReturnsCorrectValue()
        {
            Assert.AreEqual(_entry1.NumChoices, 0);

            _dlg.AddChoice(_entry1, "A choice", _entry2);
            Assert.AreEqual(_entry1.NumChoices, 1);

            _dlg.AddChoice(_entry1, "Another choice", _entry2);
            Assert.AreEqual(_entry1.NumChoices, 2);
        }
Beispiel #2
0
 public void MyTestInitialize()
 {
     _mgr    = new DialogueManager();
     _dlg    = _mgr.AddDialogue(_dlgName);
     _part   = _dlg.AddParticipant(_partName);
     _entry1 = _dlg.AddEntry(_part, entryContent);
     _entry2 = _dlg.AddEntry(_part, entryContent2);
     _choice = _dlg.AddChoice(_entry1, choiceContent, _entry2);
 }
Beispiel #3
0
        public void AddingChoicesIncreasesNumChoices()
        {
            var addedPart   = _dlg.AddParticipant("A Participant");
            var addedEntry1 = _dlg.AddEntry(addedPart, "An Entry");
            var addedEntry2 = _dlg.AddEntry(addedPart, "Another Entry");

            _dlg.AddChoice(addedEntry1, "A Choice", addedEntry2);
            Assert.AreEqual(_dlg.NumChoices, 1);

            _dlg.AddChoice(addedEntry2, "Another Choice", addedEntry1);
            Assert.AreEqual(_dlg.NumChoices, 2);
        }