public void ViewPoliciesSuccess() { ViewPoliciesSlave slave = new ViewPoliciesSlave(admin.Object, manager.Object); slave.ViewPolicies(); Assert.AreEqual((int)ViewPolicyStatus.Success, slave.Answer.Status); }
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); }
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); }