public void BadCategoryType() { RemovePolicySlave slave = new RemovePolicySlave(admin.Object, manager.Object); slave.RemovePolicy("Category", null); Assert.AreEqual((int)EditPolicyStatus.InvalidPolicyData, slave.Answer.Status); }
public void RemovePolicySuccess() { RemovePolicySlave slave = new RemovePolicySlave(admin.Object, manager.Object); slave.RemovePolicy("Category", "Shit"); Assert.AreEqual((int)EditPolicyStatus.Success, slave.Answer.Status); }
public void BadGlobalPolicyType() { RemovePolicySlave slave = new RemovePolicySlave(admin.Object, manager.Object); slave.RemovePolicy("Global", "shit"); Assert.AreEqual((int)EditPolicyStatus.InvalidPolicyData, slave.Answer.Status); }
public void RemovePolicySuccess() { RemovePolicySlave slave = new RemovePolicySlave(seller.Object, manager.Object); slave.RemovePolicy("StockItem", "Cluckin Bell", "#9"); Assert.AreEqual((int)EditStorePolicyStatus.Success, slave.Answer.Status); }
public void BadStorePolicyType() { RemovePolicySlave slave = new RemovePolicySlave(seller.Object, manager.Object); slave.RemovePolicy("Store", "Cluckin Bell", "#9"); Assert.AreEqual((int)EditStorePolicyStatus.InvalidPolicyData, slave.Answer.Status); }
public void NoAuthority() { admin.Setup(x => x.ValidateSystemAdmin()) .Throws(new MarketException((int)ManageMarketSystem.NotSystemAdmin, "")); RemovePolicySlave slave = new RemovePolicySlave(admin.Object, manager.Object); slave.RemovePolicy("Global", null); Assert.AreEqual((int)EditPolicyStatus.NoAuthority, slave.Answer.Status); }
public void NoAuthority() { seller.Setup(x => x.CanDeclarePurchasePolicy()) .Throws(new MarketException((int)PromoteStoreStatus.NoAuthority, "")); RemovePolicySlave slave = new RemovePolicySlave(seller.Object, manager.Object); slave.RemovePolicy("StockItem", "Cluckin Bell", "#9"); Assert.AreEqual((int)EditStorePolicyStatus.NoAuthority, slave.Answer.Status); }