Пример #1
0
        public void WhenIAddAStockedItemToAUsersBasket()
        {
            StockItem = StockData.First(s => s.Stock > 0);
            var url = string.Format("api/{0}/basket/add?productId={1}", UserName, StockItem.Id);

            var response = _client
                           .PutAsync(url, null)
                           .Result;

            response
            .StatusCode
            .ShouldBe(HttpStatusCode.OK, "Add to basket failed");

            Basket = response
                     .Content
                     .ReadAsAsync <List <BasketItem> >()
                     .Result;
        }
Пример #2
0
 public void ThenRecieveItemsWithNameDescriptionIdentifierAndQuantity()
 {
     StockData.Count.ShouldBeGreaterThan(0);
     AssertionExtensions.ShouldBeFullyPopulatedStockData(StockData.First());
 }