예제 #1
0
        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();
        }
예제 #2
0
        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));
        }
예제 #3
0
        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("");
        }
예제 #4
0
        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));
        }
예제 #5
0
        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();
        }