public void SimpleConditionTest()
		{
			SCConditionOwner owner = new SCConditionOwner();

			SCUser user1 = SCObjectGenerator.PrepareUserObject();

			SCObjectOperations.Instance.AddUser(user1, SCOrganization.GetRoot());

			SCUser user2 = SCObjectGenerator.PrepareUserObject();

			SCObjectOperations.Instance.AddUser(user2, SCOrganization.GetRoot());

			owner.OwnerID = UuidHelper.NewUuidString();

			string expression = string.Format("Users.CodeName == \"{0}\"", user2.CodeName);

			owner.Conditions.Add(new SCCondition() { Description = "基本测试", Condition = expression });

			SCConditionCalculator calculator = new SCConditionCalculator();

			IEnumerable<SchemaObjectBase> result = calculator.Calculate(owner);

			Assert.AreEqual(1, result.Count());

			foreach (SchemaObjectBase obj in result)
			{
				Console.WriteLine("ID:{0}, Name: {1}", obj.ID, obj.Properties.GetValue("Name", string.Empty));
			}
		}
		public void SimpleGroupConditionsTest()
		{
			SCUser userInGroup;
			SCUser userNotInGroup;

			SCGroup group = SCObjectGenerator.PrepareGroupWithConditions(out userInGroup, out userNotInGroup);

			SCConditionCalculator calculator = new SCConditionCalculator();

			SCConditionOwner owner = SCConditionAdapter.Instance.Load(group.ID, string.Empty);

			SchemaObjectCollection calculateResult = calculator.Calculate(owner);

			ConditionCalculateResultAdapter.Instance.Update(group.ID, calculateResult);

			SchemaObjectCollection loadedResult = ConditionCalculateResultAdapter.Instance.LoadCurrentUsers(group.ID);

			Assert.IsTrue(loadedResult.ContainsKey(userInGroup.ID));
			Assert.IsFalse(loadedResult.ContainsKey(userNotInGroup.ID));
		}