This repository has been archived by the owner on May 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ISpecFlowOutputHelper test (#87)
- Loading branch information
Showing
3 changed files
with
43 additions
and
3 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
SpecFlow.DependencyInjection.Tests/ISpecFlowOutputHelper.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Feature: ISpecFlowOutputHelper | ||
Issue #75: ITestOutputHelper unavailable when using SpecFlow.xUnit | ||
https://github.com/solidtoken/SpecFlow.DependencyInjection/issues/75 | ||
|
||
Scenario: Assert ISpecFlowOutputHelper Is Available | ||
The When part here is purely for displaying the message using ISpecFlowOutputHelper | ||
When a message is output using ISpecFlowOutputHelper | ||
Then verify that ISpecFlowOutputHelper is correctly injected |
34 changes: 34 additions & 0 deletions
34
SpecFlow.DependencyInjection.Tests/ISpecFlowOutputHelperSteps.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using TechTalk.SpecFlow; | ||
using TechTalk.SpecFlow.Infrastructure; | ||
using Xunit; | ||
|
||
namespace SolidToken.SpecFlow.DependencyInjection.Tests | ||
{ | ||
[Binding] | ||
public class ISpecFlowOutputHelperSteps | ||
{ | ||
private readonly ISpecFlowOutputHelper _output; | ||
|
||
public ISpecFlowOutputHelperSteps(ISpecFlowOutputHelper output) | ||
{ | ||
_output = output; | ||
} | ||
|
||
[When(@"a message is output using ISpecFlowOutputHelper")] | ||
public void WhenAMessageIsOutputUsingISpecFlowOutputHelper() | ||
{ | ||
_output.WriteLine("This is output from ISpecFlowOutputHelper"); | ||
} | ||
|
||
[Then(@"verify that ISpecFlowOutputHelper is correctly injected")] | ||
public void ThenVerifyThatISpecFlowOutputHelperIsCorrectlyInjected() | ||
{ | ||
Assert.NotNull(_output); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters