forked from allure-framework/allure-csharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AllurePlugin.cs
25 lines (22 loc) · 917 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
using System;
using System.IO;
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>();
}
}
}