示例#1
0
        public void TestUserGroupFilterNoMatch()
        {
            var user   = new ActiveDirectoryUser();
            var groups = new Dictionary <string, string>();

            user.Attributes["memberOf"] = groups;

            var jobElement = new JobElement();

            jobElement.Groups.Add("NotFound");

            var filter       = new UserGroupFilter();
            var filteredUser = filter.Execute(user, jobElement);

            Assert.IsNull(filteredUser);
        }
示例#2
0
        public void TestFilterNoSetting()
        {
            var user   = new ActiveDirectoryUser();
            var groups = new Dictionary <string, string>
            {
                { "TestGroup", "TestGroup" }
            };

            user.Attributes["memberOf"] = groups;

            var jobElement = new JobElement();
            //jobElement.FilterGroupPrefix = "";

            var filter       = new UserGroupFilter();
            var filteredUser = filter.Execute(user, jobElement);

            Assert.IsNotNull(filteredUser);
        }