コード例 #1
0
        public virtual void RegisterDefaults(ObjectContainer container)
        {
            container.RegisterTypeAs <FileSystem, IFileSystem>();

            container.RegisterTypeAs <GeneratorConfigurationProvider, IGeneratorConfigurationProvider>();
            container.RegisterTypeAs <InProcGeneratorInfoProvider, IGeneratorInfoProvider>();
            container.RegisterTypeAs <TestGenerator, ITestGenerator>();
            container.RegisterTypeAs <TestHeaderWriter, ITestHeaderWriter>();
            container.RegisterTypeAs <TestUpToDateChecker, ITestUpToDateChecker>();

            container.RegisterTypeAs <GeneratorPluginLoader, IGeneratorPluginLoader>();
            container.RegisterTypeAs <DefaultListener, ITraceListener>();

            container.RegisterTypeAs <UnitTestFeatureGenerator, UnitTestFeatureGenerator>();
            container.RegisterTypeAs <FeatureGeneratorRegistry, IFeatureGeneratorRegistry>();
            container.RegisterTypeAs <UnitTestFeatureGeneratorProvider, IFeatureGeneratorProvider>("default");
            container.RegisterTypeAs <TagFilterMatcher, ITagFilterMatcher>();

            container.RegisterTypeAs <DecoratorRegistry, IDecoratorRegistry>();
            container.RegisterTypeAs <ParallelizeDecorator, ITestClassDecorator>("parallelize");

            container.RegisterInstanceAs(GenerationTargetLanguage.CreateCodeDomHelper(GenerationTargetLanguage.CSharp), GenerationTargetLanguage.CSharp, dispose: true);
            container.RegisterInstanceAs(GenerationTargetLanguage.CreateCodeDomHelper(GenerationTargetLanguage.VB), GenerationTargetLanguage.VB, dispose: true);

            container.RegisterTypeAs <ConfigurationLoader, IConfigurationLoader>();

            container.RegisterTypeAs <SpecFlowGherkinParserFactory, IGherkinParserFactory>();

            container.RegisterTypeAs <SpecFlowJsonLocator, ISpecFlowJsonLocator>();

            RegisterUnitTestGeneratorProviders(container);
        }
コード例 #2
0
        public virtual void RegisterDefaults(ObjectContainer container)
        {
            container.RegisterTypeAs <GeneratorConfigurationProvider, IGeneratorConfigurationProvider>();
            container.RegisterTypeAs <InProcGeneratorInfoProvider, IGeneratorInfoProvider>();
            container.RegisterTypeAs <TestGenerator, ITestGenerator>();
            container.RegisterTypeAs <TestHeaderWriter, ITestHeaderWriter>();
            container.RegisterTypeAs <TestUpToDateChecker, ITestUpToDateChecker>();

            container.RegisterTypeAs <GeneratorPluginLoader, IGeneratorPluginLoader>();

            container.RegisterTypeAs <UnitTestFeatureGenerator, UnitTestFeatureGenerator>();
            container.RegisterTypeAs <FeatureGeneratorRegistry, IFeatureGeneratorRegistry>();
            container.RegisterTypeAs <UnitTestFeatureGeneratorProvider, IFeatureGeneratorProvider>("default");
            container.RegisterTypeAs <TagFilterMatcher, ITagFilterMatcher>();

            container.RegisterTypeAs <DecoratorRegistry, IDecoratorRegistry>();
            container.RegisterTypeAs <IgnoreDecorator, ITestClassTagDecorator>("ignore");
            container.RegisterTypeAs <IgnoreDecorator, ITestMethodTagDecorator>("ignore");
            container.RegisterTypeAs <ParallelizeDecorator, ITestClassDecorator>("parallelize");

            container.RegisterInstanceAs(GenerationTargetLanguage.CreateCodeDomHelper(GenerationTargetLanguage.CSharp), GenerationTargetLanguage.CSharp, dispose: true);
            container.RegisterInstanceAs(GenerationTargetLanguage.CreateCodeDomHelper(GenerationTargetLanguage.VB), GenerationTargetLanguage.VB, dispose: true);

            RegisterUnitTestGeneratorProviders(container);
        }
コード例 #3
0
        public virtual void RegisterDefaults(ObjectContainer container)
        {
            container.RegisterTypeAs <GeneratorConfigurationProvider, IGeneratorConfigurationProvider>();
            container.RegisterTypeAs <InProcGeneratorInfoProvider, IGeneratorInfoProvider>();
            container.RegisterTypeAs <TestGenerator, ITestGenerator>();
            container.RegisterTypeAs <TestHeaderWriter, ITestHeaderWriter>();
            container.RegisterTypeAs <TestUpToDateChecker, ITestUpToDateChecker>();

            container.RegisterTypeAs <GeneratorPluginLoader, IGeneratorPluginLoader>();

            container.RegisterTypeAs <UnitTestFeatureGenerator, UnitTestFeatureGenerator>();
            container.RegisterTypeAs <FeatureGeneratorRegistry, IFeatureGeneratorRegistry>();
            container.RegisterTypeAs <UnitTestFeatureGeneratorProvider, IFeatureGeneratorProvider>("default");
            container.RegisterTypeAs <TagFilterMatcher, ITagFilterMatcher>();
            container.RegisterTypeAs <StepDefinitionMatchService, IStepDefinitionMatchService>();
            container.RegisterTypeAs <DecoratorRegistry, IDecoratorRegistry>();
            container.RegisterTypeAs <IgnoreDecorator, ITestClassTagDecorator>("ignore");
            container.RegisterTypeAs <IgnoreDecorator, ITestMethodTagDecorator>("ignore");


            container.RegisterTypeAs <DefaultRuntimeConfigurationProvider, IRuntimeConfigurationProvider>();

            //  container.RegisterTypeAs<TestRunnerFactory, ITestRunnerFactory>();
            container.RegisterTypeAs <TestRunner, ITestRunner>();
            container.RegisterTypeAs <TestExecutionEngine, ITestExecutionEngine>();
            container.RegisterTypeAs <StepDefinitionMatchService, IStepDefinitionMatchService>();

            container.RegisterTypeAs <StepFormatter, IStepFormatter>();
            container.RegisterTypeAs <TestTracer, ITestTracer>();
            container.RegisterTypeAs <NUnitRuntimeProvider, IUnitTestRuntimeProvider>();
            container.RegisterTypeAs <DefaultListener, ITraceListener>();

            container.RegisterTypeAs <ErrorProvider, IErrorProvider>();
            container.RegisterTypeAs <StepArgumentTypeConverter, IStepArgumentTypeConverter>();
            container.RegisterTypeAs <RuntimeBindingSourceProcessor, IRuntimeBindingSourceProcessor>();
            container.RegisterTypeAs <RuntimeBindingRegistryBuilder, IRuntimeBindingRegistryBuilder>();
            container.RegisterTypeAs <BindingRegistry, IBindingRegistry>();
            container.RegisterTypeAs <BindingFactory, IBindingFactory>();
            container.RegisterTypeAs <StepDefinitionRegexCalculator, IStepDefinitionRegexCalculator>();
            container.RegisterTypeAs <BindingInvoker, IBindingInvoker>();

            container.RegisterTypeAs <ContextManager, IContextManager>();

            container.RegisterTypeAs <StepDefinitionSkeletonProvider, IStepDefinitionSkeletonProvider>();
            container.RegisterTypeAs <DefaultSkeletonTemplateProvider, ISkeletonTemplateProvider>();
            container.RegisterTypeAs <StepTextAnalyzer, IStepTextAnalyzer>();

            container.RegisterTypeAs <RuntimePluginLoader, IRuntimePluginLoader>();

            container.RegisterTypeAs <BindingAssemblyLoader, IBindingAssemblyLoader>();

            container.RegisterInstanceAs(GenerationTargetLanguage.CreateCodeDomHelper(GenerationTargetLanguage.CSharp), GenerationTargetLanguage.CSharp);
            container.RegisterInstanceAs(GenerationTargetLanguage.CreateCodeDomHelper(GenerationTargetLanguage.VB), GenerationTargetLanguage.VB);

            RegisterUnitTestGeneratorProviders(container);
        }
コード例 #4
0
        public string GetTestFullPath(FeatureFileInput featureFileInput)
        {
            var path = featureFileInput.GetGeneratedTestFullPath(projectSettings);

            if (path != null)
            {
                return(path);
            }

            return(featureFileInput.GetFullPath(projectSettings) + GenerationTargetLanguage.GetExtension(projectSettings.ProjectPlatformSettings.Language));
        }
コード例 #5
0
ファイル: CodeDomHelper.cs プロジェクト: zbs11491/SpecFlow
 public CodeDomHelper(CodeDomProvider codeComProvider)
 {
     switch (codeComProvider.FileExtension.ToLower(CultureInfo.InvariantCulture))
     {
         case "cs":
             TargetLanguage = GenerationTargetLanguage.CSharp;
             break;
         case "vb":
             TargetLanguage = GenerationTargetLanguage.VB;
             break;
         default:
             TargetLanguage = GenerationTargetLanguage.Other;
             break;
     }
 }
コード例 #6
0
        public virtual void RegisterDefaults(ObjectContainer container)
        {
            container.RegisterTypeAs <FileSystem, IFileSystem>();

            container.RegisterTypeAs <GeneratorConfigurationProvider, IGeneratorConfigurationProvider>();
            container.RegisterTypeAs <InProcGeneratorInfoProvider, IGeneratorInfoProvider>();
            container.RegisterTypeAs <TestGenerator, ITestGenerator>();
            container.RegisterTypeAs <TestHeaderWriter, ITestHeaderWriter>();
            container.RegisterTypeAs <TestUpToDateChecker, ITestUpToDateChecker>();

            container.RegisterTypeAs <GeneratorPluginLocator, IGeneratorPluginLocator>();
            container.RegisterTypeAs <GeneratorPluginLoader, IGeneratorPluginLoader>();
            container.RegisterTypeAs <DefaultListener, ITraceListener>();

            container.RegisterTypeAs <UnitTestFeatureGenerator, UnitTestFeatureGenerator>();
            container.RegisterTypeAs <FeatureGeneratorRegistry, IFeatureGeneratorRegistry>();
            container.RegisterTypeAs <UnitTestFeatureGeneratorProvider, IFeatureGeneratorProvider>("default");
            container.RegisterTypeAs <TagFilterMatcher, ITagFilterMatcher>();

            container.RegisterTypeAs <DecoratorRegistry, IDecoratorRegistry>();
            container.RegisterTypeAs <ParallelizeDecorator, ITestClassDecorator>("parallelize");

            container.RegisterInstanceAs(GenerationTargetLanguage.CreateCodeDomHelper(GenerationTargetLanguage.CSharp), GenerationTargetLanguage.CSharp, dispose: true);
            container.RegisterInstanceAs(GenerationTargetLanguage.CreateCodeDomHelper(GenerationTargetLanguage.VB), GenerationTargetLanguage.VB, dispose: true);

            container.RegisterTypeAs <ConfigurationLoader, IConfigurationLoader>();

            container.RegisterTypeAs <SpecFlowGherkinParserFactory, IGherkinParserFactory>();

            container.RegisterTypeAs <FileUserIdStore, IUserUniqueIdStore>();
            container.RegisterTypeAs <FileService, IFileService>();
            container.RegisterTypeAs <DirectoryService, IDirectoryService>();

            container.RegisterTypeAs <EnvironmentSpecFlowTelemetryChecker, IEnvironmentSpecFlowTelemetryChecker>();
            container.RegisterTypeAs <AnalyticsTransmitter, IAnalyticsTransmitter>();
            container.RegisterTypeAs <HttpClientAnalyticsTransmitterSink, IAnalyticsTransmitterSink>();
            container.RegisterTypeAs <AppInsightsEventSerializer, IAppInsightsEventSerializer>();
            container.RegisterTypeAs <HttpClientWrapper, HttpClientWrapper>();

            RegisterUnitTestGeneratorProviders(container);
        }
コード例 #7
0
ファイル: CodeDomHelper.cs プロジェクト: zbs11491/SpecFlow
 public CodeDomHelper(GenerationTargetLanguage targetLanguage)
 {
     TargetLanguage = targetLanguage;
 }