package com.twu.biblioteca.entity;

import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class BookTest {
    private Book book;

    @Before
    public void initBook() {
        book = new Book();
    }

    @Test
    public void canSetBookName() {
        String name = "Refactoring: Improving the Design of Existing Code";
        book.setName(name);
        assertEquals(name, book.getName());
    }

    @Test
    public void canSetBookAuthor() {
        String author = "Martin Fowler";
        book.setAuthor(author);
        assertEquals(author, book.getAuthor());
    }

}

@@ -78,16 +78,40 @@
 .Test;%0A%0A
+import java.util.Date;%0A%0A
 import s
@@ -646,10 +646,196 @@
 %0A    %7D%0A%0A
+%0A    @Test%0A    public void canSetPublishedDate() %7B%0A        String date = %22July 8, 1999%22;%0A        book.setPublishedDate(date);%0A        assertEquals(date, book.getPublishedDate());%0A    %7D%0A%0A
 %7D%0A

test setter method of fields