Ejemplo n.º 1
0
        public MarketAnswer ViewPromotionHistory()
        {
            if (real != null)
            {
                return(real.ViewPromotionHistory());
            }

            throw new NotImplementedException();
        }
Ejemplo n.º 2
0
        public void GetHistoryRecordsTest()
        {
            _ownerStoreBridge.PromoteToStoreManager("Big Smoke", "ManageProducts");
            var answer = _ownerStoreBridge.ViewPromotionHistory();

            Assert.AreEqual((int)StoreEnum.Success, answer.Status);
            var expected = new[]
            {
                "Store: HistoryShop Promoter: Pnina Promoted: Pnina Permissions: StoreOwner Date: "
                + DateTime.Now.ToString("dd/MM/yyyy") + " Description: HistoryShop has been opened",
                "Store: HistoryShop Promoter: Pnina Promoted: Big Smoke " +
                "Permissions: ManageProducts Date: " + DateTime.Now.ToString("dd/MM/yyyy") +
                " Description: Regular promotion"
            };
            var actual = answer.ReportList;

            Assert.AreEqual(expected.Length, actual.Length);
            for (var i = 0; i < expected.Length; i++)
            {
                Assert.AreEqual(expected[i], actual[i]);
            }
        }