package com.thoughtworks.biblioteca;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class MoviesTest {

    @Test
    public void shouldHaveAName() {
        Movies movies = new Movies("Titanic", 0, "bsb", 0);
        assertEquals("Titanic", movies.getMovieName());
    }

    @Test
    public void shouldHaveAYear() {
        Movies movies = new Movies("Titanic", 1990, "bsb", 0);
        assertEquals(1990, movies.getMovieYear());
    }

    @Test
    public void shouldHaveADirector() {
        Movies movies = new Movies("Titanic", 0, "James Cameron", 0);
        assertEquals("James Cameron", movies.getMovieDiector());
    }

    @Test
    public void shouldHaveAMovieRating() {
        Movies movies = new Movies("Titanic", 0, "bsb", 5);
        assertEquals(5, movies.getMovieRating());
    }

    @Test
    public void shouldBeEqualIfTheMovieNameIsSame() {
        Movies movies = new Movies("Titanic", 1990, "James Cameron", 5);
        assertEquals(movies, new Movies("Titanic", 1991, "James Camerone", 4));
    }

}

@@ -99,16 +99,64 @@
 tEquals;
+%0Aimport static org.junit.Assert.assertNotEquals;
 %0A%0Apublic
@@ -1098,10 +1098,244 @@
 %0A    %7D%0A%0A
+    @Test%0A    public void shouldBeUnEqualIfTheMovieNameIsDifferent() %7B%0A        Movies movies = new Movies(%22Titanic%22, 1990, %22James Cameron%22, 5);%0A        assertNotEquals(movies, new Movies(%22Titanic1%22, 1990, %22James Cameron%22, 5));%0A    %7D%0A%0A
 %7D%0A

two movies are equal if their names are equal