예제 #1
0
 public MarketAnswer ViewPurchaseHistoryByStore(string storeName)
 {
     if (real != null)
     {
         return(real.ViewPurchaseHistoryByStore(storeName));
     }
     throw new NotImplementedException();
 }
예제 #2
0
파일: UseCase5_4.cs 프로젝트: maorRoz/Sadna
        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]);
            }
        }