Ejemplo n.º 1
0
        public void AdvancedUrlRewriter_SecureRedirect(Dictionary <string, string> testFields)
        {
            var settings = UrlTestFactoryClass.GetSettings("UrlRewrite", testFields["TestName"], PortalId);
            var isClient = Convert.ToBoolean(testFields["Client"]);

            _securePageName = testFields["Page Name"].Trim();

            PortalController.UpdatePortalSetting(PortalId, "SSLEnforced", testFields["Enforced"].Trim(), true, "en-us");
            PortalController.UpdatePortalSetting(PortalId, "SSLEnabled", testFields["Enabled"].Trim(), true, "en-us");

            var isSecure = Convert.ToBoolean(testFields["IsSecure"].Trim());

            if (isSecure)
            {
                var tab = TabController.Instance.GetTabByName(_securePageName, PortalId);
                tab.IsSecure = true;

                UpdateTab(tab);
            }

            settings.SSLClientRedirect = isClient;

            ExecuteTest(settings, testFields, true);
        }
Ejemplo n.º 2
0
        public void AdvancedUrlProvider_VanityUrl(Dictionary <string, string> testFields)
        {
            var settings = UrlTestFactoryClass.GetSettings("FriendlyUrl", testFields["TestName"]);

            var vanityUrl       = testFields.GetValue("VanityUrl", String.Empty);
            var userName        = testFields.GetValue("UserName", String.Empty);
            var vanityUrlPrefix = testFields.GetValue("VanityUrlPrefix", String.Empty);

            if (!String.IsNullOrEmpty(vanityUrlPrefix))
            {
                settings.VanityUrlPrefix = vanityUrlPrefix;
            }

            if (!String.IsNullOrEmpty(userName))
            {
                var user = UserController.GetUserByName(PortalId, userName);
                if (user != null)
                {
                    user.VanityUrl = vanityUrl;
                    UserController.UpdateUser(PortalId, user);
                }
            }
            ExecuteTest("Improved", settings, testFields);
        }
Ejemplo n.º 3
0
        public void AdvancedUrlRewriter_BasicTest(Dictionary <string, string> testFields)
        {
            var settings = UrlTestFactoryClass.GetSettings("UrlRewrite", testFields["TestName"], this.PortalId);

            this.ExecuteTest(settings, testFields, true);
        }
Ejemplo n.º 4
0
        public void AdvancedUrlRewriter_GeminiTests(Dictionary <string, string> testFields)
        {
            var settings = UrlTestFactoryClass.GetSettings("UrlRewrite", "GeminiTests", testFields["SettingsFile"]);

            ExecuteTest(settings, testFields, true);
        }