Exemplo n.º 1
0
        public void GetLDAPConnectingStringTest()
        {
            //Doesnt matter what the settings are.
            PublishingPageTransformationInformation pti = new PublishingPageTransformationInformation()
            {
                // Don't log test runs
                SkipTelemetry = true,
            };

            UserTransformator userTransformator = new UserTransformator(pti, null, null, null);

            var result = userTransformator.GetLDAPConnectionString();

            Console.WriteLine(result);

            Assert.IsTrue(!string.IsNullOrEmpty(result));
        }
Exemplo n.º 2
0
        public void GetLDAPConnectingStringProvidedByParamTest()
        {
            var ldap = "LDAP://OU=CDT,OU=Demo Users,DC=AlphaDelta,DC=Local";

            //Doesnt matter what the settings are.
            PublishingPageTransformationInformation pti = new PublishingPageTransformationInformation()
            {
                // Don't log test runs
                SkipTelemetry = true,

                LDAPConnectionString = ldap
            };

            UserTransformator userTransformator = new UserTransformator(pti, null, null, null);

            var result = userTransformator.GetLDAPConnectionString();

            Console.WriteLine(result);

            Assert.IsTrue(!string.IsNullOrEmpty(result));
            Assert.IsTrue(result.Equals(ldap, StringComparison.InvariantCultureIgnoreCase));
        }