public void MovieLogicTests_PutCachedMovieExisting() { IOMDbConnection omdbConnection = new DummyOMDbCon(); IDataCache dataCache = new DummyDataCache(); IMovieData movieData = new DummyMovieData(); IMovieLogic movieLogic = new MovieLogic(omdbConnection, dataCache, movieData); movieLogic.PutCachedMovie("00000", DummyMovies.NewMovie); Console.WriteLine(); }
public void MovieLogicTests_GetCachedMovies() { IOMDbConnection omdbConnection = new DummyOMDbCon(); IDataCache dataCache = new DummyDataCache(); IMovieData movieData = new DummyMovieData(); IMovieLogic movieLogic = new MovieLogic(omdbConnection, dataCache, movieData); var movies = movieLogic.GetCachedMovies(); Console.WriteLine(JsonConvert.SerializeObject(movies)); }
public void MovieLogicTests_SearchMoviesByID() { IOMDbConnection omdbConnection = new DummyOMDbCon(); IDataCache dataCache = new DummyDataCache(); IMovieData movieData = new DummyMovieData(); IMovieLogic movieLogic = new MovieLogic(omdbConnection, dataCache, movieData); var movie = movieLogic.SearchMoviesByID("00000").Result; Console.WriteLine(""); }
public void MovieLogicTests_SearchMoviesByTitleAndYear() { IOMDbConnection omdbConnection = new DummyOMDbCon(); IDataCache dataCache = new DummyDataCache(); IMovieData movieData = new DummyMovieData(); IMovieLogic movieLogic = new MovieLogic(omdbConnection, dataCache, movieData); var movie = movieLogic.SearchMoviesByTitle("Movie1", "1990").Result; Console.WriteLine(JsonConvert.SerializeObject(movie)); }
public void MovieLogicTests_DelCachedMovie() { IOMDbConnection omdbConnection = new DummyOMDbCon(); IDataCache dataCache = new DummyDataCache(); IMovieData movieData = new DummyMovieData(); IMovieLogic movieLogic = new MovieLogic(omdbConnection, dataCache, movieData); movieLogic.DelCachedMovie("00000"); Console.WriteLine(); }