Exemplo n.º 1
0
        public void RegisteredUserViewStore()
        {
            MarketAnswer storeDetails = _storeBridge.ViewStoreInfo("OOF");

            Assert.AreEqual((int)ViewStoreStatus.Success, storeDetails.Status);
            string expectedAnswer = "_storeName: OOF StoreAddress: BASA";
            string receivedAnswer = "_storeName: " + storeDetails.ReportList[0] + " StoreAddress: " + storeDetails.ReportList[1];

            Assert.AreEqual(expectedAnswer, receivedAnswer);
        }
Exemplo n.º 2
0
        public MarketAnswer ViewStoreInfo(string store)
        {
            if (real != null)
            {
                return(real.ViewStoreInfo(store));
            }

            throw new NotImplementedException();
        }
Exemplo n.º 3
0
        public void InvalidUserDidntEnterSystem()
        {
            _userWatchStore   = UserDriver.getBridge();
            _storeBridgeGuest = StoreShoppingDriver.getBridge();
            _storeBridgeGuest.GetStoreShoppingService(_userWatchStore.GetUserSession());
            MarketAnswer storeDetails = _storeBridgeGuest.ViewStoreInfo("OOF");

            Assert.AreEqual((int)ViewStoreStatus.InvalidUser, storeDetails.Status);
            Assert.AreEqual(null, storeDetails.ReportList);
        }
Exemplo n.º 4
0
        public void SuccessInOpeningAStore()
        {
            MarketDB.Instance.InsertByForce();
            SignUp("Pnina", "mishol", "7894", "12345678");
            _storeBridge.GetStoreShoppingService(_bridgeSignUp.GetUserSession());
            Assert.AreEqual((int)OpenStoreStatus.Success, _storeBridge.OpenStore("PninaStore", "Ben-Gurion").Status);
            MarketAnswer storeDetails   = _storeBridge.ViewStoreInfo("PninaStore");
            string       expectedAnswer = "_storeName: PninaStore StoreAddress: Ben-Gurion";
            string       receivedAnswer = "_storeName: " + storeDetails.ReportList[0] + " StoreAddress: " + storeDetails.ReportList[1];

            Assert.AreEqual(expectedAnswer, receivedAnswer);
        }
Exemplo n.º 5
0
        public void GuestViewStore()
        {
            _userWatchStore = UserDriver.getBridge();
            _userWatchStore.EnterSystem();
            _storeBridgeGuest = StoreShoppingDriver.getBridge();
            _storeBridgeGuest.GetStoreShoppingService(_userWatchStore.GetUserSession());
            MarketAnswer storeDetails = _storeBridgeGuest.ViewStoreInfo("OOF");

            Assert.AreEqual((int)ViewStoreStatus.Success, storeDetails.Status);
            string expectedAnswer = "_storeName: OOF StoreAddress: BASA";
            string receivedAnswer = "_storeName: " + storeDetails.ReportList[0] + " StoreAddress: " + storeDetails.ReportList[1];

            Assert.AreEqual(expectedAnswer, receivedAnswer);
        }