@@ -48,43 +48,46 @@ public void should_only_print_sub_counts_if_not_zero() {
48
48
}
49
49
50
50
@ Test
51
- public void should_print_sub_counts_in_order_failed_skipped_pending_undefined_passed () {
51
+ public void should_print_sub_counts_in_order_failed_ambiguous_skipped_pending_undefined_passed () {
52
52
Stats counter = createMonochromeSummaryCounter ();
53
53
ByteArrayOutputStream baos = new ByteArrayOutputStream ();
54
54
55
55
addOneStepScenario (counter , Result .Type .PASSED );
56
56
addOneStepScenario (counter , Result .Type .FAILED );
57
+ addOneStepScenario (counter , Result .Type .AMBIGUOUS );
57
58
addOneStepScenario (counter , Result .Type .PENDING );
58
59
addOneStepScenario (counter , Result .Type .UNDEFINED );
59
60
addOneStepScenario (counter , Result .Type .SKIPPED );
60
61
counter .printStats (new PrintStream (baos ), isStrict (false ));
61
62
62
63
assertThat (baos .toString (), containsString (String .format ("" +
63
- "5 Scenarios (1 failed, 1 skipped, 1 pending, 1 undefined, 1 passed)%n" +
64
- "5 Steps (1 failed, 1 skipped, 1 pending, 1 undefined, 1 passed)%n" )));
64
+ "6 Scenarios (1 failed, 1 ambiguous , 1 skipped, 1 pending, 1 undefined, 1 passed)%n" +
65
+ "6 Steps (1 failed, 1 ambiguous , 1 skipped, 1 pending, 1 undefined, 1 passed)%n" )));
65
66
}
66
67
67
68
@ Test
68
- public void should_print_sub_counts_in_order_failed_skipped_undefined_passed_in_color () {
69
+ public void should_print_sub_counts_in_order_failed_ambiguous_skipped_undefined_passed_in_color () {
69
70
Stats counter = createColorSummaryCounter ();
70
71
ByteArrayOutputStream baos = new ByteArrayOutputStream ();
71
72
72
73
addOneStepScenario (counter , Result .Type .PASSED );
73
74
addOneStepScenario (counter , Result .Type .FAILED );
75
+ addOneStepScenario (counter , Result .Type .AMBIGUOUS );
74
76
addOneStepScenario (counter , Result .Type .PENDING );
75
77
addOneStepScenario (counter , Result .Type .UNDEFINED );
76
78
addOneStepScenario (counter , Result .Type .SKIPPED );
77
79
counter .printStats (new PrintStream (baos ), isStrict (false ));
78
80
79
- String colorSubCounts =
81
+ String colorSubCounts = "" +
80
82
AnsiEscapes .RED + "1 failed" + AnsiEscapes .RESET + ", " +
83
+ AnsiEscapes .RED + "1 ambiguous" + AnsiEscapes .RESET + ", " +
81
84
AnsiEscapes .CYAN + "1 skipped" + AnsiEscapes .RESET + ", " +
82
85
AnsiEscapes .YELLOW + "1 pending" + AnsiEscapes .RESET + ", " +
83
86
AnsiEscapes .YELLOW + "1 undefined" + AnsiEscapes .RESET + ", " +
84
87
AnsiEscapes .GREEN + "1 passed" + AnsiEscapes .RESET ;
85
88
assertThat (baos .toString (), containsString (String .format ("" +
86
- "5 Scenarios (" + colorSubCounts + ")%n" +
87
- "5 Steps (" + colorSubCounts + ")%n" )));
89
+ "6 Scenarios (" + colorSubCounts + ")%n" +
90
+ "6 Steps (" + colorSubCounts + ")%n" )));
88
91
}
89
92
90
93
@ Test
@@ -155,12 +158,14 @@ public void should_use_locale_for_decimal_separator() {
155
158
}
156
159
157
160
@ Test
158
- public void should_print_failed_scenarios () {
161
+ public void should_print_failed_ambiguous_scenarios () {
159
162
Stats counter = createMonochromeSummaryCounter ();
160
163
ByteArrayOutputStream baos = new ByteArrayOutputStream ();
161
164
162
165
counter .addStep (createResultWithStatus (Result .Type .FAILED ));
163
166
counter .addScenario (Result .Type .FAILED , "path/file.feature:3 # Scenario: scenario_name" );
167
+ counter .addStep (createResultWithStatus (Result .Type .AMBIGUOUS ));
168
+ counter .addScenario (Result .Type .AMBIGUOUS , "path/file.feature:3 # Scenario: scenario_name" );
164
169
counter .addStep (createResultWithStatus (Result .Type .UNDEFINED ));
165
170
counter .addScenario (Result .Type .UNDEFINED , "path/file.feature:3 # Scenario: scenario_name" );
166
171
counter .addStep (createResultWithStatus (Result .Type .PENDING ));
@@ -171,16 +176,21 @@ public void should_print_failed_scenarios() {
171
176
"Failed scenarios:%n" +
172
177
"path/file.feature:3 # Scenario: scenario_name%n" +
173
178
"%n" +
174
- "3 Scenarios" )));
179
+ "Ambiguous scenarios:%n" +
180
+ "path/file.feature:3 # Scenario: scenario_name%n" +
181
+ "%n" +
182
+ "4 Scenarios" )));
175
183
}
176
184
177
185
@ Test
178
- public void should_print_failed_pending_undefined_scenarios_if_strict () {
186
+ public void should_print_failed_ambiguous_pending_undefined_scenarios_if_strict () {
179
187
Stats counter = createMonochromeSummaryCounter ();
180
188
ByteArrayOutputStream baos = new ByteArrayOutputStream ();
181
189
182
190
counter .addStep (createResultWithStatus (Result .Type .FAILED ));
183
191
counter .addScenario (Result .Type .FAILED , "path/file.feature:3 # Scenario: scenario_name" );
192
+ counter .addStep (createResultWithStatus (Result .Type .AMBIGUOUS ));
193
+ counter .addScenario (Result .Type .AMBIGUOUS , "path/file.feature:3 # Scenario: scenario_name" );
184
194
counter .addStep (createResultWithStatus (Result .Type .UNDEFINED ));
185
195
counter .addScenario (Result .Type .UNDEFINED , "path/file.feature:3 # Scenario: scenario_name" );
186
196
counter .addStep (createResultWithStatus (Result .Type .PENDING ));
@@ -191,13 +201,16 @@ public void should_print_failed_pending_undefined_scenarios_if_strict() {
191
201
"Failed scenarios:%n" +
192
202
"path/file.feature:3 # Scenario: scenario_name%n" +
193
203
"%n" +
204
+ "Ambiguous scenarios:%n" +
205
+ "path/file.feature:3 # Scenario: scenario_name%n" +
206
+ "%n" +
194
207
"Pending scenarios:%n" +
195
208
"path/file.feature:3 # Scenario: scenario_name%n" +
196
209
"%n" +
197
210
"Undefined scenarios:%n" +
198
211
"path/file.feature:3 # Scenario: scenario_name%n" +
199
212
"%n" +
200
- "3 Scenarios" )));
213
+ "4 Scenarios" )));
201
214
}
202
215
203
216
private void addOneStepScenario (Stats counter , Result .Type status ) {
0 commit comments