package com.thoughtworks.biblioteca;

import org.junit.Test;

import java.util.ArrayList;

import static org.junit.Assert.assertEquals;

public class MovieLibraryTest {

    @Test
    public void shouldHaveAListOfAvailableMovies() {

        ArrayList<Movies> movies1 = new ArrayList<Movies>();
        movies1.add(new Movies("Titanic", 1990, "James Cameron", 5));
        MovieLibrary movieLibrary = new MovieLibrary(movies1);
        assertEquals(movies1,movieLibrary.getMovieLibrary());
    }

    @Test
    public void shouldReturnEqualIfTheMovieListsAreEqual() {
        ArrayList<Movies> movies = new ArrayList<Movies>();
        movies.add(new Movies("Titanic", 1990, "James Cameron", 5));
        movies.add(new Movies("Inception", 2010, "Christopher Nolan", 9));
        MovieLibrary movieLibrary1 = new MovieLibrary(movies);
        MovieLibrary movieLibrary2 = new MovieLibrary(movies);
        assertEquals(movieLibrary1,movieLibrary2);
    }

}

@@ -128,16 +128,64 @@
 tEquals;
+%0Aimport static org.junit.Assert.assertNotEquals;
 %0A%0Apublic
@@ -997,10 +997,688 @@
 %0A    %7D%0A%0A
+    @Test%0A    public void shouldReturnNotEqualIfTheMovieListsAreNotEqual() %7B%0A        ArrayList%3CMovies%3E movies = new ArrayList%3CMovies%3E();%0A        movies.add(new Movies(%22Titanic%22, 1990, %22James Cameron%22, 5));%0A        movies.add(new Movies(%22Inception%22, 2010, %22Christopher Nolan%22, 9));%0A        MovieLibrary movieLibrary1 = new MovieLibrary(movies);%0A        ArrayList%3CMovies%3E movies1 = new ArrayList%3CMovies%3E();%0A        movies1.add(new Movies(%22Titanic2%22, 1990, %22James Cameron%22, 5));%0A        movies1.add(new Movies(%22Inception%22, 2010, %22Christopher Nolan%22, 9));%0A        MovieLibrary movieLibrary2 = new MovieLibrary(movies1);%0A        assertNotEquals(movieLibrary1, movieLibrary2);%0A    %7D%0A%0A
 %7D%0A

should not return equal if the movie list are not equal