public void EqualityCreatesCorrectSearchFilter() { // Fixture setup // Exercise system var filter = SearchFilter.Equality("displayName", "John Doe"); // Verify outcome filter.ToString().Should().Be("(displayName=John Doe)"); }
public void AndCreatesCorrectSearchFilter() { // Fixture setup // Exercise system var filter = SearchFilter .Equality("displayName", "John") .And(SearchFilter.Presence("mail")) .And(SearchFilter.Negation("sn", "Doe")); // Verify outcome filter.ToString().Should().Be("(&(displayName=John)(mail=*)(!(sn=Doe)))"); }
public void Foo() { var filter = SearchFilter.Equality(DirectoryProperty.SamAccountName.ToString(), "16696763"); var provider = new DirectoryProvider(); var user = provider.FindOne(AdsPath.Parse("LDAP://DC=sigma,DC=sbrf,DC=ru"), filter); }