Ejemplo n.º 1
0
        public void ToString()
        {
            string  path    = "LDAP://server.some.local:65000/OU=people/OU=US,DC=some,DC=local";
            ADSPath adsPath = new ADSPath(path);

            Assert.AreEqual(path, adsPath.ToString(), "A10:");
        }
Ejemplo n.º 2
0
        public void GetChildADSPath(string path, string child, string expected)
        {
            ADSPath adsPath      = new ADSPath(path);
            ADSPath childAdsPath = adsPath.NewChildADSPath(child);

            Assert.AreEqual(expected, childAdsPath.Path, "A10: ");
        }
Ejemplo n.º 3
0
        public void ADSPath_BuildPath_Success(string path)
        {
            ADSPath adsPath = new ADSPath(path);

            string rebuild = adsPath.BuildFullPath();

            Assert.AreEqual(path, rebuild, "A10");
        }
Ejemplo n.º 4
0
        public void GetParentDN(string path, string expected)
        {
            ADSPath adsPath = new ADSPath(path);
            string  parent  = adsPath.GetParentDN();

            Assert.AreEqual(path, adsPath.Path, "A10: ");
            Assert.AreEqual(expected, parent, "A20: ");
        }
Ejemplo n.º 5
0
        public void DistinguishedName_Suffix_Success(string original, string expSuffix)
        {
            //string dn = "CN=scott,OU=people,dc=some,dc=local";
            //string expSuffix = "dc=some,dc=local";

            ADSPath adsPath = new ADSPath(original);

            Assert.AreEqual(expSuffix, adsPath.Suffix, "A10: ");
        }
Ejemplo n.º 6
0
        public void ADSPath_DistinguishedName_Success(string path, string expDN)
        {
            ADSPath adsPath = new ADSPath(path);

            Assert.AreEqual(expDN, adsPath.DN, "A10");
        }
Ejemplo n.º 7
0
        public void ADSPath_Prefix_Success(string path, string expPrefix)
        {
            ADSPath adsPath = new ADSPath(path);

            Assert.AreEqual(expPrefix, adsPath.Prefix, "A10");
        }
Ejemplo n.º 8
0
        public void FindCN(string path, string expected)
        {
            string cn = ADSPath.FindCN(path);

            Assert.AreEqual(expected, cn, "A10: ");
        }
Ejemplo n.º 9
0
        public void ShortName(string path, string expected)
        {
            ADSPath adsPath = new ADSPath(path);

            Assert.AreEqual(expected, adsPath.ShortName(), "A10: ");
        }