private void AddGlobalPolicy() { adminServiceSession.CreatePolicy("Global", null, "Quantity <=", "5", "0"); adminServiceSession.CreatePolicy("Global", null, "Address =", "Sunnyvale", "0"); adminServiceSession.CreatePolicy("Global", null, "AND", "0", "1"); adminServiceSession.SavePolicy(); }
public void AddSimplePolicySuccess() { DoSignInToAdmin(); adminServiceSession = (SystemAdminService)marketSession.GetSystemAdminService(userServiceSession); Assert.AreEqual((int)EditPolicyStatus.Success, adminServiceSession.CreatePolicy("Global", null, "Quantity <=", "5", "0").Status); Assert.AreEqual((int)EditPolicyStatus.Success, adminServiceSession.SavePolicy().Status); }
public void AddComplexPolicySuccess2() { DoSignInToAdmin(); adminServiceSession = (SystemAdminService)marketSession.GetSystemAdminService(userServiceSession); Assert.AreEqual((int)EditPolicyStatus.Success, adminServiceSession.CreatePolicy("Product", "Hash", "Quantity <=", "10", "0").Status); Assert.AreEqual((int)EditPolicyStatus.Success, adminServiceSession.CreatePolicy("Product", "Hash", "Username ="******"Ricky", "0").Status); Assert.AreEqual((int)EditPolicyStatus.Success, adminServiceSession.CreatePolicy("Product", "Hash", "AND", "0", "1").Status); Assert.AreEqual((int)EditPolicyStatus.Success, adminServiceSession.SavePolicy().Status); }