-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathBeforeHooks.cs
More file actions
30 lines (25 loc) · 936 Bytes
/
BeforeHooks.cs
File metadata and controls
30 lines (25 loc) · 936 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
30
using System.Collections.Generic;
using System.Linq;
using OpenFeature.Providers.Flagd.E2e.Common.Utils;
using Reqnroll;
using Xunit;
namespace OpenFeature.Providers.Flagd.E2e.ProcessTest;
[Binding]
public class BeforeHooks
{
private State State { get; set; }
public BeforeHooks(State state)
{
this.State = state;
}
[BeforeScenario(Order = 1)]
public void BeforeScenario(ScenarioInfo scenarioInfo, FeatureInfo featureInfo)
{
this.State.ProviderResolverType = ResolverType.IN_PROCESS;
var scenarioTags = scenarioInfo.Tags;
var featureTags = featureInfo.Tags;
var tags = new HashSet<string>(scenarioTags.Concat(featureTags));
Skip.If(!tags.Contains("in-process"), "Skipping scenario because it does not have required tag.");
Skip.If(tags.Contains("fractional-v1"), "Skipping legacy fractional bucketing test; v2 algorithm is implemented.");
}
}