/// <summary> /// Creates a test component builder. /// </summary> /// <param name="testModelBuilder">The associated test model builder.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="testModelBuilder"/> is null.</exception> protected BaseTestComponentBuilder(ITestModelBuilder testModelBuilder) { if (testModelBuilder == null) throw new ArgumentNullException("testModelBuilder"); this.testModelBuilder = testModelBuilder; }
/// <summary> /// Creates a test builder. /// </summary> /// <param name="testModelBuilder">The test model builder.</param> /// <param name="test">The underlying test.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="testModelBuilder"/> /// or <paramref name="test"/> is null.</exception> public DefaultTestBuilder(ITestModelBuilder testModelBuilder, PatternTest test) : base(testModelBuilder) { if (test == null) throw new ArgumentNullException("test"); this.test = test; }
/// <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 component builder. /// </summary> /// <param name="testModelBuilder">The associated test model builder.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="testModelBuilder"/> is null.</exception> protected BaseTestComponentBuilder(ITestModelBuilder testModelBuilder) { if (testModelBuilder == null) { throw new ArgumentNullException("testModelBuilder"); } this.testModelBuilder = testModelBuilder; }
private void InitializeExplorerIfNeeded(IReflectionPolicy reflectionPolicy) { if (testModelBuilder != null) { return; } testModelBuilder = new DefaultTestModelBuilder(reflectionPolicy, (PatternTestModel)TestModel); evaluator = new DefaultPatternEvaluator(testModelBuilder, DeclarativePatternResolver.Instance); }
/// <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 data context builder. /// </summary> /// <param name="testModelBuilder">The associated test model builder.</param> /// <param name="testDataContext">The underlying test data context.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="testModelBuilder"/> /// or <paramref name="testDataContext"/> is null.</exception> public DefaultTestDataContextBuilder(ITestModelBuilder testModelBuilder, PatternTestDataContext testDataContext) { if (testModelBuilder == null) throw new ArgumentNullException("testModelBuilder"); if (testDataContext == null) throw new ArgumentNullException("testDataContext"); this.testModelBuilder = testModelBuilder; this.testDataContext = testDataContext; }
/// <summary> /// Creates a test builder. /// </summary> /// <param name="testModelBuilder">The test model builder.</param> /// <param name="test">The underlying test.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="testModelBuilder"/> /// or <paramref name="test"/> is null.</exception> public DefaultTestBuilder(ITestModelBuilder testModelBuilder, PatternTest test) : base(testModelBuilder) { if (test == null) { throw new ArgumentNullException("test"); } this.test = test; }
/// <summary> /// Creates a test data context builder. /// </summary> /// <param name="testModelBuilder">The associated test model builder.</param> /// <param name="testDataContext">The underlying test data context.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="testModelBuilder"/> /// or <paramref name="testDataContext"/> is null.</exception> public DefaultTestDataContextBuilder(ITestModelBuilder testModelBuilder, PatternTestDataContext testDataContext) { if (testModelBuilder == null) { throw new ArgumentNullException("testModelBuilder"); } if (testDataContext == null) { throw new ArgumentNullException("testDataContext"); } this.testModelBuilder = testModelBuilder; this.testDataContext = testDataContext; }
/// <summary> /// Creates a pattern evaluator. /// </summary> /// <param name="testModelBuilder">The test model builder.</param> /// <param name="patternResolver">The pattern resolver.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="testModelBuilder"/> or /// <paramref name="patternResolver"/> is null.</exception> public DefaultPatternEvaluator(ITestModelBuilder testModelBuilder, IPatternResolver patternResolver) { if (testModelBuilder == null) throw new ArgumentNullException("testModelBuilder"); if (patternResolver == null) throw new ArgumentNullException("patternResolver"); this.testModelBuilder = testModelBuilder; this.patternResolver = patternResolver; registeredScopes = new MultiMap<ICodeElementInfo, IPatternScope>(); var rootDataContextBuilder = new DefaultTestDataContextBuilder(testModelBuilder, new PatternTestDataContext(null)); rootDataContextBuilder.DefineDataSource(""); rootScope = new DefaultPatternScope(this, null, testModelBuilder.RootTestBuilder, null, rootDataContextBuilder, false); }
/// <summary> /// Creates a pattern evaluator. /// </summary> /// <param name="testModelBuilder">The test model builder.</param> /// <param name="patternResolver">The pattern resolver.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="testModelBuilder"/> or /// <paramref name="patternResolver"/> is null.</exception> public DefaultPatternEvaluator(ITestModelBuilder testModelBuilder, IPatternResolver patternResolver) { if (testModelBuilder == null) { throw new ArgumentNullException("testModelBuilder"); } if (patternResolver == null) { throw new ArgumentNullException("patternResolver"); } this.testModelBuilder = testModelBuilder; this.patternResolver = patternResolver; registeredScopes = new MultiMap <ICodeElementInfo, IPatternScope>(); var rootDataContextBuilder = new DefaultTestDataContextBuilder(testModelBuilder, new PatternTestDataContext(null)); rootDataContextBuilder.DefineDataSource(""); rootScope = new DefaultPatternScope(this, null, testModelBuilder.RootTestBuilder, null, rootDataContextBuilder, false); }
private void InitializeExplorerIfNeeded(IReflectionPolicy reflectionPolicy) { if (testModelBuilder != null) return; testModelBuilder = new DefaultTestModelBuilder(reflectionPolicy, (PatternTestModel)TestModel); evaluator = new DefaultPatternEvaluator(testModelBuilder, DeclarativePatternResolver.Instance); }