static void Main(string[] args) { View view = new View(); Genre action = new Genre("Action"); Genre animation = new Genre("Animation"); Genre comedy = new Genre("Comedy"); Genre drama = new Genre("Drama"); Genre romance = new Genre("Romance"); Genre scifi = new Genre("Sci-Fi"); Title title1 = new Title("Toy Story", 9); Title ToyStory = title1; Title title2 = new Title("Sunset Boulevard", 9); Title sunsetBlvd = title2; drama = title2 + drama; animation = title1 + animation; Genre.AddToAnimationList(title1); Console.WriteLine(""); Genre.AddToDramaList(title2); Console.ReadLine(); }
public void AddToListTest() { Genre g = new Genre("g"); g.AddToList("Teen Titans", 9); Title expected = new Title("Teen Titans", 9); Title actual = Genre.titleList[0]; Assert.AreEqual(expected.Name, actual.Name); Assert.AreEqual(expected.Rating, actual.Rating); }
public void AddToAnimationListTest() { Title nightmare = new Title("The Nightmare Before Christmas", 9); Genre.animatedList.Add(nightmare); Title expected = new Title("The Nightmare Before Christmas", 9); Title actual = Genre.animatedList[2]; Assert.AreEqual(expected.Name, actual.Name); Assert.AreEqual(expected.Rating, actual.Rating); }
public void AddToComedyListTest() { Title montyPython = new Title("Monty Python and The Holy Grail", 9); Genre.comedyList.Add(montyPython); Title expected = new Title("Monty Python and The Holy Grail", 9); Title actual = Genre.comedyList[2]; Assert.AreEqual(expected.Name, actual.Name); Assert.AreEqual(expected.Rating, actual.Rating); }
public void AddToRomanceListTest() { Title casablanca = new Title("Casablanca", 9); Genre.romanceList.Add(casablanca); Title expected = new Title("Casablanca", 9); Title actual = Genre.romanceList[2]; Assert.AreEqual(expected.Name, actual.Name); Assert.AreEqual(expected.Rating, actual.Rating); }
public void AddToActionListTest() { Title madMax = new Title("Mad Max: Fury Road", 9); Genre.actionList.Add(madMax); Title expected = new Title("Mad Max: Fury Road", 9); Title actual = Genre.actionList[2]; Assert.AreEqual(expected.Name, actual.Name); Assert.AreEqual(expected.Rating, actual.Rating); }
public void AddToListTestNoParams() { Genre g = new Genre("g"); Title batman = new Title("Batman Beyond", 8); g.AddToList(batman); Title expected = new Title("Batman Beyond", 8); Title actual = Genre.titleList[1]; Assert.AreEqual(expected.Name, actual.Name); Assert.AreEqual(expected.Rating, actual.Rating); }
public static void AddToActionList(Title title) { Console.WriteLine("Action: "); if (!actionList.Contains(title)) { actionList.Add(title); foreach (Title t in actionList) { Console.WriteLine(t.Name + ": " + t.Rating.ToString() + "/10."); } } else { Console.WriteLine("Already exists in Action list"); } }
public void AddToSciFiListTest() { Title terminator = new Title("The Terminator", 9); Genre.scifiList.Add(terminator); Title expected = new Title("The Terminator", 9); Title actual = Genre.scifiList[2]; Assert.AreEqual(expected.Name, actual.Name); Assert.AreEqual(expected.Rating, actual.Rating); }
public void TestOverride() { Genre comedy = new Genre("Comedy"); Title title2 = new Title("Chef", 9); Genre comedy2 = title2 + comedy; Assert.AreEqual(comedy, comedy2); }
public void AddToDramaListTest() { Title gravity = new Title("Gravity", 9); Genre.dramaList.Add(gravity); Title expected = new Title("Gravity", 9); Title actual = Genre.dramaList[2]; Assert.AreEqual(expected.Name, actual.Name); Assert.AreEqual(expected.Rating, actual.Rating); }
public static void AddToRomanceList(Title title) { Console.WriteLine("Romance Movies:"); if (!romanceList.Contains(title)) { romanceList.Add(title); foreach (Title t in romanceList) { Console.WriteLine(t.Name + ": " + t.Rating.ToString() + "/10."); } } else { Console.WriteLine("Already exists in Romance list"); } }
public void AddToList(Title title) { titleList.Add(title); }
public static void AddToDramaList(Title title) { Console.WriteLine("Drama Movies:"); if (!dramaList.Contains(title)) { dramaList.Add(title); foreach (Title t in dramaList) { Console.WriteLine(t.Name + ": " + t.Rating.ToString() + "/10."); } } else { Console.WriteLine("Already exists in Drama list"); } }
public static void AddToSciFiList(Title title) { Console.WriteLine("Sci-Fi Movies:"); if (!scifiList.Contains(title)) { scifiList.Add(title); foreach (Title t in scifiList) { Console.WriteLine(t.Name + ": " + t.Rating.ToString() + "/10."); } } else { Console.WriteLine("Already exists in Sci-Fi list"); } }
public static void AddToComedyList(Title title) { Console.WriteLine("Comedy Movies:"); if (!comedyList.Contains(title)) { comedyList.Add(title); foreach (Title t in comedyList) { Console.WriteLine(t.Name + ": " + t.Rating.ToString() + "/10."); } } else { Console.WriteLine("Already exists in Comedy list"); } }