public void Constructor_Sets_Properties()
        {
            var quizEvent = new QuizAnsweredJournalEvent("question", "answer", "expected");

            Assert.AreEqual("question", quizEvent.Question);
            Assert.AreEqual("answer", quizEvent.Answer);
            Assert.AreEqual("expected", quizEvent.Expected);
        }
Exemplo n.º 2
0
        public void AddEntries_DuplicateEntry_ThrowsArgumentException()
        {
            SessionJournal journal = new SessionJournal();

            var entry = new QuizAnsweredJournalEvent("q", "a", "e");

            journal.AddEntry(entry);
            journal.AddEntry(entry);
        }
Exemplo n.º 3
0
        public void AddEntries_SetsEntriesInListProperly()
        {
            SessionJournal journal = new SessionJournal();

            var expected0 = new QuizAnsweredJournalEvent("q", "a", "e");
            var expected1 = new QuizAnsweredJournalEvent("q", "a", "e");

            journal.AddEntry(expected0);
            journal.AddEntry(expected1);

            Assert.AreEqual(expected0, journal.Entries[0]);
            Assert.AreEqual(expected1, journal.Entries[1]);
        }