예제 #1
0
        /// <summary>
        /// Adds a single parameter to test.
        /// <para/> returns true if successfull
        /// </summary>
        /// <param name="test">TDAPIOLELib.Test Object</param>
        /// <param name="paramName">parameter name</param>
        /// <param name="paramDescription">parameter descriptio</param>
        /// <param name="ParamDefaultValue">paramater default value</param>
        /// <returns>true if successfull</returns>
        public Boolean AddSingleParameter(TDAPIOLELib.Test test, String paramName, String paramDescription, String paramDefaultValue = "")
        {
            TDAPIOLELib.TestParameterFactory   OTestParamFactory;
            TDAPIOLELib.ISupportTestParameters OISupportTestParams;
            TDAPIOLELib.TestParameter          OTestParameter;

            OISupportTestParams = test as TDAPIOLELib.ISupportTestParameters;
            OTestParamFactory   = OISupportTestParams.TestParameterFactory as TDAPIOLELib.TestParameterFactory;

            OTestParameter              = OTestParamFactory.AddItem(System.DBNull.Value);
            OTestParameter.Name         = paramName;
            OTestParameter.Description  = paramDescription;
            OTestParameter.DefaultValue = paramDefaultValue;
            OTestParameter.Post();

            return(true);
        }
예제 #2
0
        /// <summary>
        /// Adds parameters to the test.
        /// <para/> returns true if successfull
        /// </summary>
        /// <param name="test">TDAPIOLELib.Test Object</param>
        /// <param name="paramName">List of parameter names to be added to tests</param>
        /// <param name="paramDescription">List of parameter descriptions for the parameter names</param>
        /// <param name="paramDefaultValue">List of default values for the parameter names</param>
        /// <returns>true if successfull</returns>
        public Boolean AddParameters(TDAPIOLELib.Test test, List <String> paramName, List <String> paramDescription, List <String> paramDefaultValue)
        {
            TDAPIOLELib.TestParameterFactory   OTestParamFactory;
            TDAPIOLELib.ISupportTestParameters OISupportTestParams;
            TDAPIOLELib.TestParameter          OTestParameter;

            OISupportTestParams = test as TDAPIOLELib.ISupportTestParameters;
            OTestParamFactory   = OISupportTestParams.TestParameterFactory as TDAPIOLELib.TestParameterFactory;

            for (int Counter = 0; Counter < paramName.Count; Counter++)
            {
                OTestParameter              = OTestParamFactory.AddItem(System.DBNull.Value);
                OTestParameter.Name         = paramName[Counter];
                OTestParameter.Description  = paramDescription[Counter];
                OTestParameter.DefaultValue = paramDefaultValue[Counter];
                OTestParameter.Post();
            }

            return(true);
        }