package com.twu.biblioteca.entity;

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

import java.util.ArrayList;
import java.util.List;

import static org.junit.Assert.assertEquals;

public class LibraryTest {

    private Library library;

    @Before
    public void initLibrary() {
        library = new Library();
    }

    @Test
    public void canSetBooksTest() {
        List<Book> books = new ArrayList<Book>();
        books.add(new Book("Refactoring: Improving the Design of Existing Code", "Martin Fowler", "July 8, 1999"));
        library.setBooks(books);
        assertEquals(books, library.getBooks());
    }
}

@@ -617,11 +617,256 @@
 );%0A    %7D
+%0A%0A    @Test%0A    public void canSetUsersTest() %7B%0A        List%3CUser%3E users = new ArrayList%3CUser%3E();%0A        users.add(new User(%22zhzhang%22, %221111%22, %22customer%22));%0A        library.setUsers(users);%0A        assertEquals(users, library.getUsers());%0A    %7D
 %0A%7D%0A

add canSetUsersTest of libraryTest class