/// <summary>
        /// Creates a test parameter builder.
        /// </summary>
        /// <param name="testModelBuilder">The test model builder.</param>
        /// <param name="testParameter">The underlying test parameter.</param>
        /// <exception cref="ArgumentNullException">Thrown if <paramref name="testModelBuilder"/>
        /// or <paramref name="testParameter"/> is null.</exception>
        public DefaultTestParameterBuilder(ITestModelBuilder testModelBuilder, PatternTestParameter testParameter)
            : base(testModelBuilder)
        {
            if (testParameter == null)
                throw new ArgumentNullException("testParameter");

            this.testParameter = testParameter;
        }
        /// <summary>
        /// Creates a test parameter builder.
        /// </summary>
        /// <param name="testModelBuilder">The test model builder.</param>
        /// <param name="testParameter">The underlying test parameter.</param>
        /// <exception cref="ArgumentNullException">Thrown if <paramref name="testModelBuilder"/>
        /// or <paramref name="testParameter"/> is null.</exception>
        public DefaultTestParameterBuilder(ITestModelBuilder testModelBuilder, PatternTestParameter testParameter)
            : base(testModelBuilder)
        {
            if (testParameter == null)
            {
                throw new ArgumentNullException("testParameter");
            }

            this.testParameter = testParameter;
        }
Пример #3
0
        /// <inheritdoc />
        public ITestParameterBuilder CreateParameter(string name, ICodeElementInfo codeElement, ITestDataContextBuilder dataContextBuilder)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }
            if (dataContextBuilder == null)
            {
                throw new ArgumentNullException("dataContextBuilder");
            }

            PatternTestParameter testParameter = new PatternTestParameter(name, codeElement, dataContextBuilder.ToPatternTestDataContext());

            test.AddParameter(testParameter);
            return(new DefaultTestParameterBuilder(GetTestModelBuilder(), testParameter));
        }
Пример #4
0
        /// <inheritdoc />
        public ITestParameterBuilder CreateParameter(string name, ICodeElementInfo codeElement, ITestDataContextBuilder dataContextBuilder)
        {
            if (name == null)
                throw new ArgumentNullException("name");
            if (dataContextBuilder == null)
                throw new ArgumentNullException("dataContextBuilder");

            PatternTestParameter testParameter = new PatternTestParameter(name, codeElement, dataContextBuilder.ToPatternTestDataContext());
            test.AddParameter(testParameter);
            return new DefaultTestParameterBuilder(GetTestModelBuilder(), testParameter);
        }