Example #1
0
 public MarketAnswer ViewPurchaseHistoryByStore(string storeName)
 {
     if (real != null)
     {
         return(real.ViewPurchaseHistoryByStore(storeName));
     }
     throw new NotImplementedException();
 }
Example #2
0
        public void SuccessHistoryPurchaseStore()
        {
            SignIn(adminName, adminPass);
            _adminBridge.GetAdminService(_adminSignInBridge.GetUserSession());
            MarketAnswer res = _adminBridge.ViewPurchaseHistoryByStore(storeToCheck);

            string[] purchaseUserHistory = res.ReportList;
            string[] expectedHistory     =
            {
                "User: Maor Product: hello2 Store: blahblah Sale: Immediate Quantity: 2 Price: 40 Date: " + DateTime.Now.Date.ToString("dd/MM/yyyy"),
                "User: Pnina Product: hello Store: blahblah Sale: Immediate Quantity: 2 Price: 20 Date: " + DateTime.Now.Date.ToString("dd/MM/yyyy")
            };

            Assert.AreEqual((int)ViewPurchaseHistoryStatus.Success, res.Status);
            for (int i = 0; i < purchaseUserHistory.Length; i++)
            {
                Assert.AreEqual(expectedHistory[i], purchaseUserHistory[i]);
            }
        }