Implementet rootDse and default ldap server features. Fixes for properties loading.
[mono.git] / mcs / class / System.DirectoryServices / Test / System.DirectoryServices / DirectoryServicesSearchResultTest.cs
index 6be79186fb7d42a994a53d43d1b1090284f91c37..e80a158f97574983d54c2b6bbd0fab655066438d 100644 (file)
@@ -261,16 +261,20 @@ namespace MonoTests.System.DirectoryServices
 \r
                        SearchResultCollection results = ds.FindAll();\r
 \r
-                       Assert.AreEqual(results[0].Path,LDAPServerRoot + "dc=myhosting,dc=example");\r
+                       // MS works only with "LDAP" while RFC2255 states "ldap"\r
+                       Assert.AreEqual(results[0].Path.ToLower(),(LDAPServerRoot + "dc=myhosting,dc=example").ToLower());\r
                        Assert.AreEqual(results[0].Path,results[0].GetDirectoryEntry().Path);\r
 \r
-                       Assert.AreEqual(results[1].Path,LDAPServerRoot + "ou=people,dc=myhosting,dc=example");\r
+                       // MS works only with "LDAP" while RFC2255 states "ldap"\r
+                       Assert.AreEqual(results[1].Path.ToLower(),(LDAPServerRoot + "ou=people,dc=myhosting,dc=example").ToLower());\r
                        Assert.AreEqual(results[1].Path,results[1].GetDirectoryEntry().Path);\r
 \r
-                       Assert.AreEqual(results[2].Path,LDAPServerRoot + "ou=Human Resources,ou=people,dc=myhosting,dc=example");\r
+                       // MS works only with "LDAP" while RFC2255 states "ldap"\r
+                       Assert.AreEqual(results[2].Path.ToLower(),(LDAPServerRoot + "ou=Human Resources,ou=people,dc=myhosting,dc=example").ToLower());\r
                        Assert.AreEqual(results[2].Path,results[2].GetDirectoryEntry().Path);\r
 \r
-                       Assert.AreEqual(results[3].Path,LDAPServerRoot + "cn=John Smith,ou=Human Resources,ou=people,dc=myhosting,dc=example");\r
+                       // MS works only with "LDAP" while RFC2255 states "ldap"\r
+                       Assert.AreEqual(results[3].Path.ToLower(),(LDAPServerRoot + "cn=John Smith,ou=Human Resources,ou=people,dc=myhosting,dc=example").ToLower());\r
                        Assert.AreEqual(results[3].Path,results[3].GetDirectoryEntry().Path);\r
                }\r
 \r
@@ -323,7 +327,8 @@ namespace MonoTests.System.DirectoryServices
 \r
                        Assert.AreEqual(((ResultPropertyValueCollection)result.Properties["cn"])[0],"Barak Tsabari");\r
                        Assert.AreEqual(((ResultPropertyValueCollection)result.Properties["objectClass"])[0],"person");\r
-                       Assert.AreEqual(((ResultPropertyValueCollection)result.Properties["AdsPath"])[0],LDAPServerRoot + "cn=Barak Tsabari,ou=Human Resources,ou=people,dc=myhosting,dc=example");\r
+                       // MS works only with "LDAP" while RFC2255 states "ldap"\r
+                       Assert.AreEqual(((string)((ResultPropertyValueCollection)result.Properties["AdsPath"])[0]).ToLower(),(LDAPServerRoot + "cn=Barak Tsabari,ou=Human Resources,ou=people,dc=myhosting,dc=example").ToLower());\r
                }\r
 \r
                #endregion Tests\r