public void NextCycling()
        {
            var session = new LearningSession(this.words, this.words, 1);

            session.CurrentWord.Answer = "on";
            session.Next();
            session.CurrentWord.Answer = "one";
            session.Next();
            session.CurrentWord.Answer = "two";
            session.Next();
            session.CurrentWord.Answer = "single";
            session.Next();

            Assert.IsNotNull(session.CurrentWord);
            Assert.AreEqual(words.Where(w => w.Spelling == "one").FirstOrDefault().ID, session.CurrentWord.Word.ID);
        }
        public void NextCorrect()
        {
            var session = new LearningSession(this.words, this.words, 1);

            session.CurrentWord.Answer = "one";
            var actual = session.Next();

            Assert.AreEqual(LearningSession.NextResult.Correct, actual);
            Assert.IsNull(session.Items.Where(w => w.Word.Spelling == "one").FirstOrDefault());
            Assert.IsNotNull(session.PassedWords.Where(w => w.Spelling == "one").FirstOrDefault());
        }
        public void NextExpactedOtherVariant()
        {
            var session = new LearningSession(this.words, this.words, 1);

            session.CurrentWord.Answer = "one";
            session.Next();
            session.CurrentWord.Answer = "two";
            session.Next();

            session.CurrentWord.Answer = "one";
            var actual = session.Next();
            var currentWord = session.Items.Where(w => w.Word.Spelling == "single").FirstOrDefault();

            Assert.AreEqual(LearningSession.NextResult.ExpectedOtherVariant, actual);
            Assert.IsNotNull(currentWord);
            Assert.AreEqual(1, currentWord.TimesToShow);
            Assert.AreEqual(session.CurrentWord.Word.ID, currentWord.Word.ID);
        }
        public void NextFinished()
        {
            var session = new LearningSession(this.words, this.words, 1);
            bool isFinished = false;
            session.OnFinish += (s) => isFinished = true;

            session.CurrentWord.Answer = "one";
            session.Next();
            session.CurrentWord.Answer = "two";
            session.Next();

            session.CurrentWord.Answer = "single";
            var actual = session.Next();

            Assert.AreEqual(LearningSession.NextResult.Finished, actual);
            Assert.IsNull(session.CurrentWord);
            Assert.AreEqual(0, session.Items.Count);
            Assert.AreEqual(3, session.PassedWords.Count);
            Assert.AreEqual(true, isFinished);
        }