Package org.neo4j.cineasts.domain

Examples of org.neo4j.cineasts.domain.Movie


        assertEquals("2 correct movies found by query", new HashSet<Movie>(asList(movie1, movie2)), new HashSet<Movie>(found));
    }

    @Test
    public void testFindTwoMoviesButRestrictToOne() throws Exception {
        Movie movie1 = movieRepository.save(new Movie("1", "Test-Movie1"));
        Movie movie2 = movieRepository.save(new Movie("2", "Test-Movie2"));
        Movie movie3 = movieRepository.save(new Movie("3", "Another-Movie3"));
        List<Movie> found = movieRepository.findByTitleLike("Test*", new PageRequest(0, 1)).getContent();
        assertEquals("1 movie found",1,found.size());
        assertTrue("1 correct movie found by query", found.get(0).getTitle().startsWith("Test"));
    }
View Full Code Here


    @Autowired
    MovieRepository movieRepository;

    @Test
    public void testImportMovie() throws Exception {
        Movie movie = importService.importMovie("2");
        assertEquals("movie-id","2", movie.getId());
        assertEquals("movie-title","Ariel", movie.getTitle());
    }
View Full Code Here

        assertEquals("movie-title","Ariel", movie.getTitle());
    }

    @Test
    public void testImportMovieTwice() throws Exception {
        Movie movie = importService.importMovie("2");
        Movie movie2 = importService.importMovie("2");
        final Movie foundMovie = movieRepository.findById("2");
        assertEquals("movie-id", movie, foundMovie);
    }
View Full Code Here

TOP

Related Classes of org.neo4j.cineasts.domain.Movie

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.