public void DeleteBookFromListTest() { var booklist = new BookList(); var book = new Book("Book", "Author", 2000, "isbn", Category.Drama); booklist.DeleteBook(book); Assert.Equal(0, booklist.Size()); }
private void delBtn_Click(object sender, RoutedEventArgs e) { try { if (bookListView.SelectedIndex != -1) { bookList.DeleteBook(bookListView.SelectedIndex); } } catch { MessageBox.Show("Delete error occured."); } }