Ejemplo n.º 1
0
        public void CopyToTest()
        {
            Show s = new Show("Lost");

            Season s01 = new Season(1);
            Season s02 = new Season(2);

            s01.Add(new Episode(1, "Pilot"));
            s01.Add(new Episode(2, "Second"));
            s01.Add(new Episode(3, "Third"));

            s.Add(s01);
            s.Add(s02);

            Season[] liste = new Season[s.Count];

            s.CopyTo(liste, 0);

            Assert.That(liste[0].Number, Is.EqualTo(1));
            Assert.That(liste[0].GetEpisodeByNumber(3).Name, Is.EqualTo("Third"));
            Assert.That(liste[1].Number, Is.EqualTo(2));
        }