示例#1
0
        public void DeleteSeededBook()
        {
            var book     = ScenarioContext.Current.Get <Book>("seededBook");
            var response = CrudBook.DeleteBook(book.Id);

            ExceptionHandler.ThrowIfStatusCodeNotNoContent(response.ResponseCode);
        }
示例#2
0
        public void GivenBookIsDeletedById(int id)
        {
            Book deletedBook = CrudBook.GetBook(id).PayLoadObject;
            ResponseCodeAndPayload <ResponseMessageContent> deletedRequestMessage = CrudBook.DeleteBook(id);

            ScenarioContext.Current.Set <Book>(deletedBook, "deletedBook");
            ScenarioContext.Current.Set <ResponseCodeAndPayload <ResponseMessageContent> >
                (deletedRequestMessage, "deletedRequestMessage");
        }
示例#3
0
        public void DeleteAllBooks()
        {
            List <Book> books = CrudBook.GetAllBooks().PayLoadObject;

            foreach (var book in books)
            {
                ExceptionHandler.ThrowIfStatusCodeNotNoContent(CrudBook.DeleteBook(book.Id).ResponseCode);
            }
        }