Beispiel #1
0
 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();
 }
Beispiel #2
0
 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);
 }
Beispiel #3
0
 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);
 }