Beispiel #1
0
 def test_select_movie_to_watch_index_out_of_bounds(self):
     watchlist = WatchList()
     watchlist.add_movie(Movie("Moana", 2016, 1))
     watchlist.add_movie(Movie("Ice Age", 2002, 2))
     watchlist.add_movie(Movie("Guardians of the Galaxy", 2012, 3))
     print()
     print(f"Selected movie: {watchlist.select_movie_to_watch(9)}")
Beispiel #2
0
 def test_check_size_of_nonempty_watchlist(self):
     watchlist = WatchList()
     watchlist.add_movie(Movie("Moana", 2016, 1))
     watchlist.add_movie(Movie("Ice Age", 2002, 2))
     watchlist.add_movie(Movie("Guardians of the Galaxy", 2012, 3))
     print()
     print(f"Size of watchlist is: {watchlist.size()}")
Beispiel #3
0
 def test_add_movie(self):
     watchlist = WatchList()
     watchlist.add_movie(Movie("Moana", 2016, 1))
     watchlist.add_movie(Movie("Ice Age", 2002, 2))
     watchlist.add_movie(Movie("Guardians of the Galaxy", 2012, 3))
     print()
     print(watchlist.first_movie_in_watchlist())
Beispiel #4
0
 def test_iterator_used(self):
     watchlist = WatchList()
     watchlist.add_movie(Movie("Moana", 2016, 1))
     watchlist.add_movie(Movie("Ice Age", 2002, 2))
     watchlist.add_movie(Movie("Guardians of the Galaxy", 2012, 3))
     print()
     for movie in watchlist:
         print(movie)
Beispiel #5
0
 def test_remove_movie_which_is_in_watchlist(self):
     watchlist = WatchList()
     watchlist.add_movie(Movie("Moana", 2016, 1))
     watchlist.remove_movie(Movie("Moana", 2016, 2))
     print()
     print(f"Size of watchlist is: {watchlist.size()}")
Beispiel #6
0
 def test_add_same_movie_again(self):
     watchlist = WatchList()
     watchlist.add_movie(Movie("Moana", 2016, 1))
     watchlist.add_movie(Movie("Moana", 2016, 2))
     print()
     print(f"Size of watchlist is: {watchlist.size()}")
Beispiel #7
0
 def test_init(self):
     watchlist = WatchList()
     print()
     print(f"Size of watchlist: {watchlist.size()}")