private void WhenABookIsAddedToTheCart() { _cart.AddBook(new Book { Author = "SomeAuthor", Title = "SomeTitle", BookType = BookType.Hardback, Price = (decimal)4.99 }); }
public int ShoppingCartTest(int[] bookArray) { var target = new ShoppingCart(); for (var i = 0; i < 5; i++) { if (bookArray[i] > 0) { target.AddBook(_bookName[i], bookArray[i]); } } return(target.GetPrice()); }
public void A_ShoppingCart_with_any_one_book_Price_is_8(int bookNumber) { SetUpEmptyCart(); _myCart.AddBook(new Book(bookNumber)); CartPriceInCentsShouldBe(BookPrice); }