-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathAllurePlugin.cs
28 lines (25 loc) · 962 Bytes
/
AllurePlugin.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using Allure.SpecFlowPlugin;
using TechTalk.SpecFlow.Bindings;
using TechTalk.SpecFlow.Plugins;
using TechTalk.SpecFlow.Tracing;
using TechTalk.SpecFlow.UnitTestProvider;
[assembly: RuntimePlugin(typeof(AllurePlugin))]
namespace Allure.SpecFlowPlugin
{
public class AllurePlugin : IRuntimePlugin
{
public void Initialize(
RuntimePluginEvents runtimePluginEvents,
RuntimePluginParameters runtimePluginParameters,
UnitTestProviderConfiguration unitTestProviderConfiguration
)
{
runtimePluginEvents.CustomizeGlobalDependencies +=
(sender, args) => args.ObjectContainer
.RegisterTypeAs<AllureBindingInvoker, IBindingInvoker>();
runtimePluginEvents.CustomizeTestThreadDependencies +=
(sender, args) => args.ObjectContainer
.RegisterTypeAs<AllureTestTracerWrapper, ITestTracer>();
}
}
}