コード例 #1
0
        public TestGenerator(SpecFlow.Configuration.SpecFlowConfiguration specFlowConfiguration, ProjectSettings projectSettings, ITestHeaderWriter testHeaderWriter, ITestUpToDateChecker testUpToDateChecker, IFeatureGeneratorRegistry featureGeneratorRegistry, CodeDomHelper codeDomHelper)
        {
            if (specFlowConfiguration == null)
            {
                throw new ArgumentNullException("specFlowConfiguration");
            }
            if (projectSettings == null)
            {
                throw new ArgumentNullException("projectSettings");
            }
            if (testHeaderWriter == null)
            {
                throw new ArgumentNullException("testHeaderWriter");
            }
            if (testUpToDateChecker == null)
            {
                throw new ArgumentNullException("testUpToDateChecker");
            }
            if (featureGeneratorRegistry == null)
            {
                throw new ArgumentNullException("featureGeneratorRegistry");
            }

            this.specFlowConfiguration    = specFlowConfiguration;
            this.testUpToDateChecker      = testUpToDateChecker;
            this.featureGeneratorRegistry = featureGeneratorRegistry;
            this.codeDomHelper            = codeDomHelper;
            this.testHeaderWriter         = testHeaderWriter;
            this.projectSettings          = projectSettings;
        }
コード例 #2
0
 public void RegisterCustomizations(ObjectContainer container, SpecFlow.Configuration.SpecFlowConfiguration specFlowConfiguration)
 {
     if (specFlowConfiguration.StopAtFirstError)
     {
         container.RegisterTypeAs <DefaultListener, ITraceListener>();
     }
 }
コード例 #3
0
ファイル: PluginTests.cs プロジェクト: zhengbingjie/SpecFlow
 public void RegisterCustomizations(ObjectContainer container, SpecFlow.Configuration.SpecFlowConfiguration specFlowConfiguration)
 {
     if (specFlowConfiguration.StopAtFirstError)
     {
         container.RegisterTypeAs <CustomTestRunnerFactory, ITestRunnerFactory>();
     }
 }
コード例 #4
0
 public UnitTestFeatureGenerator(IUnitTestGeneratorProvider testGeneratorProvider, CodeDomHelper codeDomHelper, SpecFlow.Configuration.SpecFlowConfiguration specFlowConfiguration, IDecoratorRegistry decoratorRegistry)
 {
     this.testGeneratorProvider  = testGeneratorProvider;
     this.codeDomHelper          = codeDomHelper;
     this._specFlowConfiguration = specFlowConfiguration;
     this.decoratorRegistry      = decoratorRegistry;
 }
コード例 #5
0
        public TestGenerator(SpecFlow.Configuration.SpecFlowConfiguration specFlowConfiguration,
                             ProjectSettings projectSettings,
                             ITestHeaderWriter testHeaderWriter,
                             ITestUpToDateChecker testUpToDateChecker,
                             IFeatureGeneratorRegistry featureGeneratorRegistry,
                             CodeDomHelper codeDomHelper,
                             IGherkinParserFactory gherkinParserFactory)
        {
            if (specFlowConfiguration == null)
            {
                throw new ArgumentNullException(nameof(specFlowConfiguration));
            }
            if (projectSettings == null)
            {
                throw new ArgumentNullException(nameof(projectSettings));
            }
            if (testHeaderWriter == null)
            {
                throw new ArgumentNullException(nameof(testHeaderWriter));
            }
            if (testUpToDateChecker == null)
            {
                throw new ArgumentNullException(nameof(testUpToDateChecker));
            }
            if (featureGeneratorRegistry == null)
            {
                throw new ArgumentNullException(nameof(featureGeneratorRegistry));
            }
            if (gherkinParserFactory == null)
            {
                throw new ArgumentNullException(nameof(gherkinParserFactory));
            }

            this.specFlowConfiguration    = specFlowConfiguration;
            this.testUpToDateChecker      = testUpToDateChecker;
            this.featureGeneratorRegistry = featureGeneratorRegistry;
            this.codeDomHelper            = codeDomHelper;
            this.testHeaderWriter         = testHeaderWriter;
            this.projectSettings          = projectSettings;
            this.gherkinParserFactory     = gherkinParserFactory;
        }
コード例 #6
0
 public void RegisterConfigurationDefaults(SpecFlow.Configuration.SpecFlowConfiguration specFlowConfiguration)
 {
 }
コード例 #7
0
 private static ErrorProvider CreateErrorProvider(IStepFormatter stepFormatter = null, SpecFlow.Configuration.SpecFlowConfiguration specFlowConfiguration = null, IUnitTestRuntimeProvider unitTestRuntimeProvider = null)
 {
     return(new ErrorProvider(stepFormatter, specFlowConfiguration, unitTestRuntimeProvider));
 }
コード例 #8
0
 public static void AddAdditionalStepAssembly(this SpecFlow.Configuration.SpecFlowConfiguration specFlowConfiguration, Assembly assembly)
 {
     specFlowConfiguration.AdditionalStepAssemblies.Add(assembly.FullName);
 }