Exemple #1
0
        public void CreateBooksCollection()
        {
            ListsViewModel listsViewModel     = new ListsViewModel();
            ObservableCollection <Book> books = listsViewModel.GetBooks();

            Assert.AreEqual(books.Count, BookCRUD.countBooks());
        }
Exemple #2
0
 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);
 }