File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
java/src/main/java/io/cucumber/junitxmlformatter Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -60,17 +60,19 @@ int getTestCaseCount() {
60
60
return query .findAllTestCaseStarted ().size ();
61
61
}
62
62
63
- String getPickleName (TestCaseStarted testCaseStarted ) {
64
- Pickle pickle = query .findPickleBy (testCaseStarted )
63
+ private Pickle getPickle (TestCaseStarted testCaseStarted ) {
64
+ return query .findPickleBy (testCaseStarted )
65
65
.orElseThrow (() -> new IllegalStateException ("No pickle for " + testCaseStarted .getId ()));
66
+ }
66
67
67
- return query .findNameOf (pickle , namingStrategy );
68
+ String getPickleName (TestCaseStarted testCaseStarted ) {
69
+ return query .findNameOf (getPickle (testCaseStarted ), namingStrategy );
68
70
}
69
71
70
72
String getFeatureName (TestCaseStarted testCaseStarted ) {
71
73
return query .findFeatureBy (testCaseStarted )
72
74
.map (Feature ::getName )
73
- .orElseThrow (() -> new IllegalStateException ( "No feature for " + testCaseStarted ));
75
+ .orElseGet (() -> this . getPickle ( testCaseStarted ). getUri ( ));
74
76
}
75
77
76
78
List <Entry <String , String >> getStepsAndResult (TestCaseStarted testCaseStarted ) {
You can’t perform that action at this time.
0 commit comments