public void CreateBooksCollection() { ListsViewModel listsViewModel = new ListsViewModel(); ObservableCollection <Book> books = listsViewModel.GetBooks(); Assert.AreEqual(books.Count, BookCRUD.countBooks()); }
public List <Book> GetBooks() { books = new List <Book>(); for (int i = 1; i <= BookCRUD.countBooks(); i++) { Book b = new Book(i); if (b.State == 1) { books.Add(b); } } return(books); }