Exemple #1
0
        public void DeleteBookDescriptionConsistencyTest()
        {
            Assert.AreEqual(repository.GetAllBookDescriptions().Count(), 5);
            repository.DeleteBookDescription(repository.GetBookCopy(0).Book);
            Assert.AreEqual(repository.GetAllBookDescriptions().Count(), 5);

            var book = new BookDescription("Książka", "Bezimienny", "Null");

            repository.AddBookDescription(book);
            Assert.AreEqual(repository.GetAllBookDescriptions().Count(), 6);
            repository.DeleteBookDescription(book);
            Assert.AreEqual(repository.GetAllBookDescriptions().Count(), 5);
        }
        public void DeleteBookDescription(string title)
        {
            var bookDescription = _dataRepository.GetBookDescription(title);

            _dataRepository.DeleteBookDescription(bookDescription);
        }