Ejemplo n.º 1
0
        public void TestUS6_3()
        {
            IReadingSession   rs  = CreateReadingSession();
            IMessageViewModel mvm = new MessageViewModel(rs);

            rs.Next("A1");
            rs.Next("A3");

            Assert.AreEqual("Vous quittez le paragraphe 2 pour aller au paragraphe 4. Vous avez atteint la fin du livre.", mvm.Message);
        }
Ejemplo n.º 2
0
        public void TestUS6_1()
        {
            IReadingSession   rs  = CreateReadingSession();
            IMessageViewModel mvm = new MessageViewModel(rs);

            rs.Next("A1");
            rs.Next("A2");

            Assert.AreEqual("Vous quittez le paragraphe 2 pour aller au paragraphe 3.", mvm.Message);
        }
Ejemplo n.º 3
0
        public void TestUS6_2()
        {
            IReadingSession   rs  = CreateReadingSession();
            IMessageViewModel mvm = new MessageViewModel(rs);

            rs.Next("A1");
            rs.Next("A2");
            rs.Back();

            Assert.AreEqual("Vous avez déjà lu le paragraphe 2. Vous êtes ensuite aller au paragraphe 3.", mvm.Message);
        }
Ejemplo n.º 4
0
        public void BackTest()
        {
            IReadingSession rs = CreateReadingSession();

            rs.Next("A1");
            rs.Next("A2");

            rs.Back();

            Assert.AreEqual("P2", rs.Paragraph);
        }
Ejemplo n.º 5
0
        public void ResetTest()
        {
            IReadingSession rs = CreateReadingSession();

            rs.Next("A1");
            rs.Next("A2");

            rs.Reset();

            Assert.AreEqual("P1", rs.Paragraph);
        }
Ejemplo n.º 6
0
        public void NextTest()
        {
            IReadingSession rs = CreateReadingSession();

            Assert.AreEqual("P1", rs.Paragraph);

            rs.Next("A1");

            Assert.AreEqual("P2", rs.Paragraph);

            rs.Next("Not in answers");

            Assert.AreEqual("P2", rs.Paragraph);
        }
        public void TestUS7_4()
        {
            IReadingSession rs = CreateReadingSession();
            IParagraphsBoxViewModel pbvm = new ParagraphsBoxViewModel(rs);
            IList<string> listpara = new List<string>()
            {
                pbvm.ParagraphSelected,
                "Paragraphe 1 : Lorem ipsum dolor sit amet, consect..."
            };

            rs.Next("A1");
            rs.Next("A2");
            rs.Back();
            rs.GoTo(0);

            SameContent(listpara, pbvm.ParagraphVisited);
        }
 public AnswerViewModel(IReadingSession readingSession, string answer)
 {
     Label  = answer;
     Select = new BasicRelayCommand(() => readingSession.Next(answer));
 }