Skip to content

Commit e2c9427

Browse files
committed
Support Reqnroll v3
1 parent 6cfd122 commit e2c9427

File tree

5 files changed

+10
-15
lines changed

5 files changed

+10
-15
lines changed

Allure.Reqnroll.Tests.Samples/Allure.Reqnroll.Tests.Samples.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
<ItemGroup>
1616
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
1717
<PackageReference Include="Castle.Core" Version="5.1.1" />
18-
<PackageReference Include="Reqnroll" Version="2.4.1" />
19-
<PackageReference Include="Reqnroll.Tools.MsBuild.Generation" Version="2.4.1" />
20-
<PackageReference Include="Reqnroll.xUnit" Version="2.4.1" />
18+
<PackageReference Include="Reqnroll" Version="3.0.3" />
19+
<PackageReference Include="Reqnroll.Tools.MsBuild.Generation" Version="3.0.3" />
20+
<PackageReference Include="Reqnroll.xUnit" Version="3.0.3" />
2121
<PackageReference Include="xunit" Version="2.9.0" />
2222
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
2323
<PrivateAssets>all</PrivateAssets>

Allure.Reqnroll.Tests/Integration/IntegrationTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,12 @@ static Dictionary<string, List<string>> ParseFeatures(string featuresDir)
274274
{
275275
var children = parser.Parse(f.FullName).Feature.Children.ToList();
276276
var scenarioOutlines = children.Where(
277-
x => (x as dynamic).Examples.Length > 0
277+
x => (x as dynamic).Examples.Count > 0
278278
).ToList();
279279
foreach (var s in scenarioOutlines)
280280
{
281281
var examplesCount = (s as dynamic).Examples[0]
282-
.TableBody.Length;
282+
.TableBody.Count;
283283
for (int i = 1; i < examplesCount; i++)
284284
{
285285
children.Add(s);

Allure.Reqnroll/Allure.Reqnroll.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
<ItemGroup>
2323
<PackageReference Include="CsvHelper" Version="33.0.1" />
24-
<PackageReference Include="Reqnroll" Version="2.4.1" />
24+
<PackageReference Include="Reqnroll" Version="3.0.3" />
2525
<PackageReference Include="System.Collections.Specialized" Version="4.3.0" />
2626
</ItemGroup>
2727

Allure.Reqnroll/Events/HookFinishedEventHandler.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ void HandleEvent(HookFinishedEvent eventData)
5252
AllureReqnrollStateFacade.StartTestCase();
5353
break;
5454
case HookType.AfterScenario:
55-
AllureReqnrollStateFacade.StopContainer();
56-
break;
5755
case HookType.AfterFeature:
5856
AllureReqnrollStateFacade.StopContainer();
5957
this.EnsureFeatureReported(eventData);

Allure.Reqnroll/SelectiveRun/TestPlanAwareTestRunner.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ ITestRunner underlyingRunner
4444
this.underlyingRunner = underlyingRunner;
4545
}
4646

47-
public void InitializeTestRunner(string testWorkerId) =>
48-
this.underlyingRunner.InitializeTestRunner(testWorkerId);
49-
5047
public async Task OnTestRunStartAsync() =>
5148
await this.underlyingRunner.OnTestRunStartAsync();
5249

@@ -59,9 +56,9 @@ public async Task OnFeatureStartAsync(FeatureInfo featureInfo) =>
5956
public async Task OnFeatureEndAsync() =>
6057
await this.underlyingRunner.OnFeatureEndAsync();
6158

62-
public void OnScenarioInitialize(ScenarioInfo scenarioInfo)
59+
public void OnScenarioInitialize(ScenarioInfo scenarioInfo, RuleInfo ruleInfo)
6360
{
64-
this.underlyingRunner.OnScenarioInitialize(scenarioInfo);
61+
this.underlyingRunner.OnScenarioInitialize(scenarioInfo, ruleInfo);
6562
this.ApplyTestPlanToCurrentScenario();
6663
}
6764

@@ -74,7 +71,7 @@ public async Task OnScenarioStartAsync()
7471
else
7572
{
7673
// This call will set the scenario's status to skipped.
77-
this.SkipScenario();
74+
await this.SkipScenarioAsync();
7875

7976
// We're skipping scenarios not in the test plan using the unit
8077
// test framework's runtime API. Neither BeforeScenario nor
@@ -91,7 +88,7 @@ public async Task CollectScenarioErrorsAsync() =>
9188
public async Task OnScenarioEndAsync() =>
9289
await this.underlyingRunner.OnScenarioEndAsync();
9390

94-
public void SkipScenario() => this.underlyingRunner.SkipScenario();
91+
public async Task SkipScenarioAsync() => await this.underlyingRunner.SkipScenarioAsync();
9592

9693
public async Task GivenAsync(
9794
string text,

0 commit comments

Comments
 (0)