public void AddSeasonTest() { Show s = new Show("Lost"); Season s01 = new Season(1); s01.Add(new Episode(1, "Pilot")); s.Add(s01); s.Add(new Season(2)); s.GetSeasonByNumber(2).Add(new Episode(1, "Second")); Assert.That(s.Count, Is.Not.EqualTo(0)); Assert.That(s.Count, Is.EqualTo(2)); Assert.That(s.GetSeasonByNumber(2).Number, Is.EqualTo(2)); }
public void CreateShowWitListTest() { Season s01 = new Season(1); s01.Add(new Episode(1,"Pilot")); Dictionary<int, Season> seasons = new Dictionary<int, Season>(); seasons.Add(s01.Number, s01); Show show = new Show("Lost", seasons); Assert.That(show.Name, Is.EqualTo("Lost")); Assert.That(show.GetSeasonByNumber(1).Number, Is.EqualTo(1)); Assert.That(show.GetSeasonByNumber(1).GetEpisodeByNumber(1).Name, Is.EqualTo("Pilot")); Assert.That(show.GetSeasonByNumber(1).GetEpisodeByNumber(1).Number, Is.EqualTo(1)); }