Ejemplo n.º 1
0
        public void Test8()
        {
            ZonePoeme zp         = new ZonePoeme(ttt);
            int       startLigne = 720;
            Vers      v;

            for (int i = 0; i < 48; i++)
            {
                v = new Vers(ttt, startLigne, pws);
                Assert.IsTrue(zp.AddVers(v));
                startLigne = v.Last + 2;
            }

            Assert.AreEqual(v8, zp.ToString());

            startLigne = zp.Last + 2;
            v          = new Vers(ttt, startLigne, pws);
            Assert.IsFalse(zp.AddVers(v));

            TestTheText.CompareWordByWord(v8Syls, zp.Syllabes());
            zp.ChercheDierese(0);
            TestTheText.CompareWordByWord(v8SylsDierese, zp.Syllabes());

            Assert.ThrowsException <ArgumentOutOfRangeException>(() => zp.ChercheDierese(-1));
        }
Ejemplo n.º 2
0
        public void Test151()
        {
            ZonePoeme zp         = new ZonePoeme(ttt);
            int       startLigne = 0;
            Vers      v;

            for (int i = 0; i < 15; i++)
            {
                v = new Vers(ttt, startLigne, pws);
                Assert.IsTrue(zp.AddVers(v));
                startLigne = v.Last + 2;
            }

            Assert.AreEqual(exp31Premiers15, zp.ToString());

            startLigne = zp.Last + 2;
            v          = new Vers(ttt, startLigne, pws);
            Assert.IsFalse(zp.AddVers(v));
            TestTheText.CompareWordByWord(exp31Prem15Syls, zp.Syllabes());
            zp.ChercheDierese(0);
            TestTheText.CompareWordByWord(exp31Prem15SylsDierese, zp.Syllabes());
        }