コード例 #1
0
        public void Should_be_able_to_change_default_configuration_from_a_plugin()
        {
            var pluginWithCustomConfiguration = new PluginWithCustomConfiguration(conf => conf.StopAtFirstError = true);
            var runtimePluginEvents           = new RuntimePluginEvents();

            pluginWithCustomConfiguration.Initialize(runtimePluginEvents, new RuntimePluginParameters(), new UnitTestProviderConfiguration());

            var specFlowConfiguration = ConfigurationLoader.GetDefault();

            runtimePluginEvents.RaiseConfigurationDefaults(specFlowConfiguration);

            specFlowConfiguration.StopAtFirstError.Should().BeTrue();
        }
コード例 #2
0
        public void Should_be_able_to_change_default_configuration_from_a_plugin()
        {
            var pluginWithCustomConfiguration = new PluginWithCustomConfiguration(conf => conf.SpecFlowConfiguration.StopAtFirstError = true);
            var generatorPluginEvents         = new GeneratorPluginEvents();

            pluginWithCustomConfiguration.Initialize(generatorPluginEvents, new GeneratorPluginParameters(), new UnitTestProviderConfiguration());

            var specFlowProjectConfiguration = new SpecFlowProjectConfiguration();

            generatorPluginEvents.RaiseConfigurationDefaults(specFlowProjectConfiguration);

            specFlowProjectConfiguration.SpecFlowConfiguration.StopAtFirstError.Should().BeTrue();
        }