Example #1
0
        public string GetEndPoint()
        {
            ApplicationConfiguration appconfig = new ApplicationConfiguration(@"GeneralConfiguration", "RunConfig");
            string runlocation = appconfig.GetConfig()["RunLocation"];

            runlocation = appconfig.GetConfig(@"APIConfiguration", "EndPoint")[runlocation];
            return(runlocation);
        }
Example #2
0
        public void TestInitialize()

        {
            ApplicationConfiguration appconfig = new ApplicationConfiguration("APIConfiguration", "ErrorMessages");

            ErrorDictionary = appconfig.GetConfig();
            TestsRunParams  = appconfig.GetConfig("APIConfiguration", "TestsConfig");
            EndPoint        = appconfig.GetConfig("GeneralConfiguration", "RunConfig")["RunLocation"];
        }
        protected static Uri GetUriByRelativePath(string relativePath)
        {
            relativePath = Regex.Replace(relativePath, "Page", "", RegexOptions.IgnoreCase);
            ApplicationConfiguration appconf = new ApplicationConfiguration("GeneralConfiguration", "RunConfig");
            string endPoint = appconf.GetConfig()["RunLocation"];

            appconf  = new ApplicationConfiguration("UISeleniumConfiguration", "EndPoint");
            endPoint = appconf.GetConfig()[endPoint];
            endPoint = Regex.Replace(endPoint, @"\/$", String.Empty);
            return(new Uri(string.Format("{0}{1}", endPoint, relativePath).ToLower()));
            //return new Uri(string.Format("{0}{1}", Settings.Default.TestEnvironment, relativePath).ToLower());
        }
Example #4
0
        protected string GetConfigErrorMessage(string typeOfMessage)
        {
            ApplicationConfiguration appconf = new ApplicationConfiguration(@"GeneralConfiguration/API", "ErrorMessages");

            return(appconf.GetConfig()[typeOfMessage]);
        }