示例#1
0
        private Shop MakeClickNCollectOrderAlreadyPaid()
        {
            var webSession = new WebSession();
            var customer   = _webAuthentificationService.ConnectCustomer(
                "*****@*****.**",
                "notfunnypassword"
                );

            webSession.ConnectCustomer(customer);

            var articleBarCode = "0102030405";
            var article        = _articlesService.GetArticles(articleBarCode).First();

            webSession.AddArticle(article);
            var availablesShops = _shopInfosService.GetShops();

            Assert.AreEqual(2, availablesShops.Count());

            var selectedShop = availablesShops.First(
                shop => shop.Address.City == "Toulouse"
                );

            webSession.SetClickNCollectDeliveryMode(selectedShop.Id);

            webSession.PayWtihBC(
                "4545-5555-5555-5555",
                "01/25",
                "111"
                );
            webSession.CompleteTransaction();

            return(webSession.GetSelectedShop());
        }
示例#2
0
        public void REQ_15_MakeOnlineBracket_WithoutConnection()
        {
            var webSession     = new WebSession();
            var articleBarCode = "0102030405";
            var article        = _articlesService.GetArticles(articleBarCode).First();

            webSession.AddArticle(article);
            Assert.AreEqual(article.Price, webSession.Bracket.GetTotalPrice());
            Assert.IsFalse(webSession.CanFinalizeOrder);
        }
示例#3
0
        private WebSession MakeWebConnectedSession()
        {
            var webSession = new WebSession();
            var customer   = _webAuthentificationService.ConnectCustomer(
                "*****@*****.**",
                "notfunnypassword"
                );

            webSession.ConnectCustomer(customer);

            var articleBarCode = "0102030405";
            var article        = _articlesService.GetArticles(articleBarCode).First();

            webSession.AddArticle(article);
            return(webSession);
        }