public void Initialize(RuntimePluginEvents runtimePluginEvents, RuntimePluginParameters runtimePluginParameters) { runtimePluginEvents.CustomizeGlobalDependencies += (sender, args) => { if (args.RuntimeConfiguration.StopAtFirstError) args.ObjectContainer.RegisterTypeAs<CustomTestRunnerFactory, ITestRunnerFactory>(); }; }
public void Initialize(RuntimePluginEvents runtimePluginEvents, RuntimePluginParameters runtimePluginParameters) { runtimePluginEvents.CustomizeTestThreadDependencies += (sender, args) => { _specificTestRunnerDependencies(args.ObjectContainer); }; }
public void Initialize(RuntimePluginEvents runtimePluginEvents, RuntimePluginParameters runtimePluginParameters) { runtimePluginEvents.CustomizeScenarioDependencies += (sender, args) => { _specificScenarioDependencies(args.ObjectContainer); }; }
public void Initialize(RuntimePluginEvents runtimePluginEvents, RuntimePluginParameters runtimePluginParameters) { runtimePluginEvents.RegisterGlobalDependencies += (sender, args) => args.ObjectContainer.RegisterTypeAs<CustomDependency, ICustomDependency>(); }
public void Initialize(RuntimePluginEvents runtimePluginEvents, RuntimePluginParameters runtimePluginParameters) { runtimePluginEvents.ConfigurationDefaults += (sender, args) => { specifyDefaults(args.RuntimeConfiguration); }; }
protected virtual void LoadPlugins(IRuntimeConfigurationProvider configurationProvider, ObjectContainer container, RuntimePluginEvents runtimePluginEvents) { // initialize plugins that were registered from code foreach (var runtimePlugin in container.Resolve<IDictionary<string, IRuntimePlugin>>().Values) { // these plugins cannot have parameters runtimePlugin.Initialize(runtimePluginEvents, new RuntimePluginParameters()); } // load & initalize parameters from configuration var pluginLoader = container.Resolve<IRuntimePluginLoader>(); foreach (var pluginDescriptor in configurationProvider.GetPlugins().Where(pd => (pd.Type & PluginType.Runtime) != 0)) { LoadPlugin(pluginDescriptor, pluginLoader, runtimePluginEvents); } }
protected virtual void LoadPlugin(PluginDescriptor pluginDescriptor, IRuntimePluginLoader pluginLoader, RuntimePluginEvents runtimePluginEvents) { var plugin = pluginLoader.LoadPlugin(pluginDescriptor); var runtimePluginParameters = new RuntimePluginParameters { Parameters = pluginDescriptor.Parameters }; plugin.Initialize(runtimePluginEvents, runtimePluginParameters); }