Exemple #1
0
        public void ViewPoliciesSuccess()
        {
            ViewPoliciesSlave slave = new ViewPoliciesSlave(admin.Object, manager.Object);

            slave.ViewPolicies();
            Assert.AreEqual((int)ViewPolicyStatus.Success, slave.Answer.Status);
        }
Exemple #2
0
        public void NoAuthority()
        {
            admin.Setup(x => x.ValidateSystemAdmin())
            .Throws(new MarketException((int)ManageMarketSystem.NotSystemAdmin, ""));
            ViewPoliciesSlave slave = new ViewPoliciesSlave(admin.Object, manager.Object);

            slave.ViewPolicies();
            Assert.AreEqual((int)ViewPolicyStatus.NoAuthority, slave.Answer.Status);
        }
Exemple #3
0
        public void NoAuthority()
        {
            seller.Setup(x => x.CanDeclarePurchasePolicy())
            .Throws(new MarketException((int)PromoteStoreStatus.NoAuthority, ""));
            ViewPoliciesSlave slave = new ViewPoliciesSlave(seller.Object, manager.Object);

            slave.ViewPolicies("X");
            Assert.AreEqual((int)ViewStorePolicyStatus.NoAuthority, slave.Answer.Status);
        }