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(); }
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(); }