forked from open-feature/dotnet-sdk-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestHooks.cs
More file actions
29 lines (25 loc) · 760 Bytes
/
TestHooks.cs
File metadata and controls
29 lines (25 loc) · 760 Bytes
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
29
using System.Threading.Tasks;
using TechTalk.SpecFlow;
namespace OpenFeature.Contrib.Providers.Flagd.E2e.RpcTest.Steps
{
[Binding]
public class TestHooks
{
public static FlagdRpcTestBedContainer FlagdTestBed { get; private set; }
[BeforeTestRun]
public static async Task StartContainerAsync()
{
FlagdTestBed = new FlagdRpcTestBedContainer();
await FlagdTestBed.Container.StartAsync();
}
[AfterTestRun]
public static async Task StopContainerAsync()
{
if (FlagdTestBed != null)
{
await FlagdTestBed.Container.StopAsync();
await FlagdTestBed.Container.DisposeAsync();
}
}
}
}