package com.twu.biblioteca;

import com.twu.biblioteca.model.Book;
import org.junit.Test;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

public class BookTest {

    private Book testBook
            = new Book("Alice in Wonderland",
            "Lewis Carroll",
            "1/26/1895");

    @Test
    public void getTitle() {
        assertEquals("Alice in Wonderland", testBook.getTitle());
    }

    @Test
    public void testToString() {
        String bookString = testBook.toString();
        assertTrue(bookString.contains(testBook.getTitle()));
    }
}
