@@ -80,113 +80,113 @@ public void I_can_use_the_logger_to_produce_a_summary_that_includes_the_list_of_
80
80
}
81
81
82
82
[ Fact ]
83
- public void I_can_use_the_logger_to_produce_a_summary_that_includes_the_list_of_skipped_tests ( )
83
+ public void I_can_use_the_logger_to_produce_a_summary_that_includes_the_list_of_failed_tests ( )
84
84
{
85
85
// Arrange
86
86
using var summaryWriter = new StringWriter ( ) ;
87
87
88
88
var context = new TestLoggerContext (
89
89
new GitHubWorkflow ( TextWriter . Null , summaryWriter ) ,
90
- new TestLoggerOptions { SummaryIncludeSkippedTests = true }
90
+ TestLoggerOptions . Default
91
91
) ;
92
92
93
93
// Act
94
94
context . SimulateTestRun (
95
95
new TestResultBuilder ( )
96
96
. SetDisplayName ( "Test1" )
97
97
. SetFullyQualifiedName ( "TestProject.SomeTests.Test1" )
98
- . SetOutcome ( TestOutcome . Skipped )
98
+ . SetOutcome ( TestOutcome . Failed )
99
+ . SetErrorMessage ( "ErrorMessage1" )
99
100
. Build ( ) ,
100
101
new TestResultBuilder ( )
101
102
. SetDisplayName ( "Test2" )
102
103
. SetFullyQualifiedName ( "TestProject.SomeTests.Test2" )
103
- . SetOutcome ( TestOutcome . Skipped )
104
+ . SetOutcome ( TestOutcome . Failed )
105
+ . SetErrorMessage ( "ErrorMessage2" )
104
106
. Build ( ) ,
105
107
new TestResultBuilder ( )
106
108
. SetDisplayName ( "Test3" )
107
109
. SetFullyQualifiedName ( "TestProject.SomeTests.Test3" )
108
- . SetOutcome ( TestOutcome . Skipped )
110
+ . SetOutcome ( TestOutcome . Failed )
111
+ . SetErrorMessage ( "ErrorMessage3" )
109
112
. Build ( ) ,
110
113
new TestResultBuilder ( )
111
114
. SetDisplayName ( "Test4" )
112
115
. SetFullyQualifiedName ( "TestProject.SomeTests.Test4" )
113
- . SetOutcome ( TestOutcome . Failed )
114
- . SetErrorMessage ( "ErrorMessage4" )
116
+ . SetOutcome ( TestOutcome . Passed )
117
+ . Build ( ) ,
118
+ new TestResultBuilder ( )
119
+ . SetDisplayName ( "Test5" )
120
+ . SetFullyQualifiedName ( "TestProject.SomeTests.Test5" )
121
+ . SetOutcome ( TestOutcome . Skipped )
115
122
. Build ( )
116
123
) ;
117
124
118
125
// Assert
119
126
var output = summaryWriter . ToString ( ) . Trim ( ) ;
120
127
121
128
output . Should ( ) . Contain ( "Test1" ) ;
129
+ output . Should ( ) . Contain ( "ErrorMessage1" ) ;
122
130
output . Should ( ) . Contain ( "Test2" ) ;
131
+ output . Should ( ) . Contain ( "ErrorMessage2" ) ;
123
132
output . Should ( ) . Contain ( "Test3" ) ;
124
- output . Should ( ) . Contain ( "Test4" ) ;
133
+ output . Should ( ) . Contain ( "ErrorMessage3" ) ;
134
+
135
+ output . Should ( ) . NotContain ( "Test4" ) ;
136
+ output . Should ( ) . NotContain ( "Test5" ) ;
125
137
126
138
testOutput . WriteLine ( output ) ;
127
139
}
128
140
129
141
[ Fact ]
130
- public void I_can_use_the_logger_to_produce_a_summary_that_includes_the_list_of_failed_tests ( )
142
+ public void I_can_use_the_logger_to_produce_a_summary_that_includes_the_list_of_skipped_tests ( )
131
143
{
132
144
// Arrange
133
145
using var summaryWriter = new StringWriter ( ) ;
134
146
135
147
var context = new TestLoggerContext (
136
148
new GitHubWorkflow ( TextWriter . Null , summaryWriter ) ,
137
- TestLoggerOptions . Default
149
+ new TestLoggerOptions { SummaryIncludeSkippedTests = true }
138
150
) ;
139
151
140
152
// Act
141
153
context . SimulateTestRun (
142
154
new TestResultBuilder ( )
143
155
. SetDisplayName ( "Test1" )
144
156
. SetFullyQualifiedName ( "TestProject.SomeTests.Test1" )
145
- . SetOutcome ( TestOutcome . Failed )
146
- . SetErrorMessage ( "ErrorMessage1" )
157
+ . SetOutcome ( TestOutcome . Skipped )
147
158
. Build ( ) ,
148
159
new TestResultBuilder ( )
149
160
. SetDisplayName ( "Test2" )
150
161
. SetFullyQualifiedName ( "TestProject.SomeTests.Test2" )
151
- . SetOutcome ( TestOutcome . Failed )
152
- . SetErrorMessage ( "ErrorMessage2" )
162
+ . SetOutcome ( TestOutcome . Skipped )
153
163
. Build ( ) ,
154
164
new TestResultBuilder ( )
155
165
. SetDisplayName ( "Test3" )
156
166
. SetFullyQualifiedName ( "TestProject.SomeTests.Test3" )
157
- . SetOutcome ( TestOutcome . Failed )
158
- . SetErrorMessage ( "ErrorMessage3" )
167
+ . SetOutcome ( TestOutcome . Skipped )
159
168
. Build ( ) ,
160
169
new TestResultBuilder ( )
161
170
. SetDisplayName ( "Test4" )
162
171
. SetFullyQualifiedName ( "TestProject.SomeTests.Test4" )
163
- . SetOutcome ( TestOutcome . Passed )
164
- . Build ( ) ,
165
- new TestResultBuilder ( )
166
- . SetDisplayName ( "Test5" )
167
- . SetFullyQualifiedName ( "TestProject.SomeTests.Test5" )
168
- . SetOutcome ( TestOutcome . Skipped )
172
+ . SetOutcome ( TestOutcome . Failed )
173
+ . SetErrorMessage ( "ErrorMessage4" )
169
174
. Build ( )
170
175
) ;
171
176
172
177
// Assert
173
178
var output = summaryWriter . ToString ( ) . Trim ( ) ;
174
179
175
180
output . Should ( ) . Contain ( "Test1" ) ;
176
- output . Should ( ) . Contain ( "ErrorMessage1" ) ;
177
181
output . Should ( ) . Contain ( "Test2" ) ;
178
- output . Should ( ) . Contain ( "ErrorMessage2" ) ;
179
182
output . Should ( ) . Contain ( "Test3" ) ;
180
- output . Should ( ) . Contain ( "ErrorMessage3" ) ;
181
-
182
- output . Should ( ) . NotContain ( "Test4" ) ;
183
- output . Should ( ) . NotContain ( "Test5" ) ;
183
+ output . Should ( ) . Contain ( "Test4" ) ;
184
184
185
185
testOutput . WriteLine ( output ) ;
186
186
}
187
187
188
188
[ Fact ]
189
- public void I_can_use_the_logger_to_produce_a_summary_that_reports_empty_test_assemblies ( )
189
+ public void I_can_use_the_logger_to_produce_a_summary_that_includes_empty_test_suites ( )
190
190
{
191
191
// Arrange
192
192
using var summaryWriter = new StringWriter ( ) ;
@@ -207,7 +207,7 @@ public void I_can_use_the_logger_to_produce_a_summary_that_reports_empty_test_as
207
207
}
208
208
209
209
[ Fact ]
210
- public void I_can_use_the_logger_to_produce_no_summary_for_empty_test_assemblies_using_options ( )
210
+ public void I_can_use_the_logger_to_produce_a_summary_that_does_not_include_empty_test_suites ( )
211
211
{
212
212
// Arrange
213
213
using var summaryWriter = new StringWriter ( ) ;
0 commit comments