Example #1
0
        /// <summary>
        /// Init does the following :
        /// Store Parameter Info.
        /// Parse out the commonly required and universal tags
        /// </summary>
        public virtual void Init(CXmlDriverParam param)
        {
            varInfo = param;
            string resultType = varInfo.SelectExistingValue("Result/@Type", "Data");

            if (resultType == "Valid")
            {
                isValid = true;
            }
            else
            {
                isValid = false;
            }

            exceptionType = varInfo.SelectValue("Result/ExceptionType", "Data");
            exceptionMsg  = varInfo.SelectValue("Result/ExceptionMessage", "Data");
            xmlFile       = varInfo.SelectValue("Result/TestXmlFile", "Data");
            filePath      = varInfo.SelectValue("filepath", "Data");
            filePath      = FilePathUtil.ExpandVariables(filePath);
            if (filePath == null)
            {
                Log("Setting filePath = " + filePath);
            }
            httpPath = varInfo.SelectValue("httppath", "Data");
        }
Example #2
0
        /// <summary>
        /// Reads the value of the tag in the Spec file under the FilterCriteria Section
        /// </summary>
        /// <param name="tag">Name of the tag to read.</param>
        /// <param name="throwOnNull">IF true, will check for null and throw,
        /// set to true if you want to throw an exception if value is not found.
        /// If set to false, the return value can be null</param>
        /// <returns>Value of the tag under FilterCriteria Section</returns>
        protected string ReadFilterCriteria(string tag, bool throwOnNull)
        {
            CError.WriteIgnore("Filtering " + tag + " : ");
            string s = null;

            if (throwOnNull)
            {
                s = varInfo.SelectExistingValue(tag, "FilterCriteria");
                Log(s);
            }
            else
            {
                s = varInfo.SelectValue(tag, "FilterCriteria");
                Log(s);
            }
            return(s);
        }
Example #3
0
        /// <summary>
        /// Init does the following :
        /// Store Parameter Info.
        /// Parse out the commonly required and universal tags
        /// </summary>
        public virtual void Init(CXmlDriverParam param)
        {
            varInfo = param;
            string resultType = varInfo.SelectExistingValue("Result/@Type", "Data");
            if (resultType == "Valid")
                isValid = true;
            else
                isValid = false;

            exceptionType = varInfo.SelectValue("Result/ExceptionType", "Data");
            exceptionMsg = varInfo.SelectValue("Result/ExceptionMessage", "Data");
            xmlFile = varInfo.SelectValue("Result/TestXmlFile", "Data");
            filePath = varInfo.SelectValue("filepath", "Data");
            filePath = FilePathUtil.ExpandVariables(filePath);
            if (filePath == null)
            {
                Log("Setting filePath = " + filePath);
            }
            httpPath = varInfo.SelectValue("httppath", "Data");
        }