public void TearDown()
 {
     viewModel = null;
     movie     = null;
     preferences.ClearPreferences();
     preferences = null;
 }
        public void Setup()
        {
            movie            = new Movie();
            movie.ItemID     = fakeItemID;
            movie.Imageurl   = fakeURL;
            movie.Overview   = fakeOverview;
            movie.Prediction = fakePrediction;
            movie.Title      = fakeTitle;
            movie.Year       = fakeYear;

            preferences = new UserMoviePreferencesTestObject();
        }
Beispiel #3
0
        public void Setup()
        {
            exceptionHandled = false;
            preferences      = new UserMoviePreferencesTestObject();

            mockClient = new Mock <RestClient>();
            var genreListTask         = Task.FromResult <IDictionary <string, List <Movie> > >(popularMovies);
            var recommendedMoviesTask = Task.FromResult <IList <Movie> >(new List <Movie> {
                new Movie()
                {
                    ItemID = "111"
                }
            });

            mockClient.Setup(x => x.GetPopularMovies(It.IsAny <List <Genre> >())).Returns(genreListTask);
            mockClient.Setup(x => x.GetMovieRecommendationsFromPreferences(It.IsAny <UserMoviePreferences>())).Returns(recommendedMoviesTask);

            faultyMockClient = new Mock <RestClient>();
            viewModel        = new BrowseViewModel(ex => { e = ex; exceptionHandled = true; }, preferences, mockClient.Object);
        }