package com.twu.biblioteca.service;

/**
 * Created by zhihuizhang on 7/19/15.
 */
public class LibraryServiceTest {
}

@@ -34,86 +34,994 @@
 e;%0A%0A
-/**%0A * Created by zhihuizhang on 7/19/15.%0A */%0Apublic class LibraryServiceTest %7B
+import com.twu.biblioteca.entity.Book;%0Aimport com.twu.biblioteca.entity.User;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Apublic class LibraryServiceTest %7B%0A%0A    private LibraryService libraryService;%0A%0A    @Before%0A    public void initLibraryService() %7B%0A%0A        libraryService = new LibraryService();%0A    %7D%0A%0A    @Test%0A    public void canInitLibraryTest() %7B%0A        User user = new User(%22zhzhang%22, %221111%22, %22customer%22);%0A        assertEquals(user.getName(), libraryService.initLibrary().getUsers().get(0).getName());%0A        assertEquals(user.getPassword(), libraryService.initLibrary().getUsers().get(0).getPassword());%0A%0A        Book book = new Book(%22Refactoring: Improving the Design of Existing Code%22, %22Martin Fowler%22, %22July 8, 1999%22);%0A        assertEquals(book.getName(), libraryService.initLibrary().getBooks().get(0).getName());%0A        assertEquals(book.getAuthor(), libraryService.initLibrary().getBooks().get(0).getAuthor());%0A    %7D
 %0A%7D%0A

add canInitLibraryTest