This repository was archived by the owner on May 22, 2024. It is now read-only.
File tree 3 files changed +43
-3
lines changed
SpecFlow.DependencyInjection.Tests
3 files changed +43
-3
lines changed Original file line number Diff line number Diff line change
1
+ Feature : ISpecFlowOutputHelper
2
+ Issue #75: ITestOutputHelper unavailable when using SpecFlow.xUnit
3
+ https://github.com/solidtoken/SpecFlow.DependencyInjection/issues/75
4
+
5
+ Scenario : Assert ISpecFlowOutputHelper Is Available
6
+ The When part here is purely for displaying the message using ISpecFlowOutputHelper
7
+ When a message is output using ISpecFlowOutputHelper
8
+ Then verify that ISpecFlowOutputHelper is correctly injected
Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using System . Collections . Generic ;
3
+ using System . Linq ;
4
+ using System . Text ;
5
+ using System . Threading . Tasks ;
6
+ using TechTalk . SpecFlow ;
7
+ using TechTalk . SpecFlow . Infrastructure ;
8
+ using Xunit ;
9
+
10
+ namespace SolidToken . SpecFlow . DependencyInjection . Tests
11
+ {
12
+ [ Binding ]
13
+ public class ISpecFlowOutputHelperSteps
14
+ {
15
+ private readonly ISpecFlowOutputHelper _output ;
16
+
17
+ public ISpecFlowOutputHelperSteps ( ISpecFlowOutputHelper output )
18
+ {
19
+ _output = output ;
20
+ }
21
+
22
+ [ When ( @"a message is output using ISpecFlowOutputHelper" ) ]
23
+ public void WhenAMessageIsOutputUsingISpecFlowOutputHelper ( )
24
+ {
25
+ _output . WriteLine ( "This is output from ISpecFlowOutputHelper" ) ;
26
+ }
27
+
28
+ [ Then ( @"verify that ISpecFlowOutputHelper is correctly injected" ) ]
29
+ public void ThenVerifyThatISpecFlowOutputHelperIsCorrectlyInjected ( )
30
+ {
31
+ Assert . NotNull ( _output ) ;
32
+ }
33
+ }
34
+ }
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Linq ;
3
- using Microsoft . Extensions . DependencyInjection ;
1
+ using Microsoft . Extensions . DependencyInjection ;
4
2
5
3
namespace SolidToken . SpecFlow . DependencyInjection . Tests
6
4
{
You can’t perform that action at this time.
0 commit comments