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); }
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); }