Back to project page filmster.
The source code is released under:
Apache License
If you think the Android project filmster listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.doodeec.filmster.Provider; /*from www. j ava2 s. c o m*/ import android.test.AndroidTestCase; import com.doodeec.filmster.Mock; import com.doodeec.filmster.Model.Movie; import java.util.ArrayList; import java.util.List; /** * Created by Dusan Doodeec Bartos on 20.10.2014. * * @see com.doodeec.filmster.Provider.MovieProvider */ public class MovieProviderSpec extends AndroidTestCase { @Override protected void setUp() throws Exception { super.setUp(); MovieProvider.clearMoviesDb(); List<Movie> movies = new ArrayList<Movie>(); movies.add(new Movie(Mock.REST_MOVIE())); MovieProvider.saveMoviesToDb(movies); } public void testGetMovies() throws Exception { assertNotNull(MovieProvider.getSavedMovies()); assertEquals(1, MovieProvider.getSavedMovies().size()); } public void testClearMovies() throws Exception { MovieProvider.clearMoviesDb(); assertNotNull(MovieProvider.getSavedMovies()); assertEquals(0, MovieProvider.getSavedMovies().size()); } }