Example #1
0
        public void GivenAddNewItem_WhenItemExiting_ThenReturnfalse()
        {
            var articleGuid = Guid.NewGuid();
            var basket      = new Basket();
            var bi          = new BasketItem()
            {
                Article = new Article()
                {
                    IdArticle = articleGuid
                }
            };

            basket.BasketItems = new List <BasketItem>();
            basket.BasketItems.Add(bi);

            _basketRepository.Setup(x => x.Find(articleGuid)).Returns(basket);
            var res = _basketService.AddItemsToBasket(articleGuid, bi);

            Assert.IsFalse(res);
        }