File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
java/src/main/java/io/cucumber/junitxmlformatter Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 12
12
import io .cucumber .messages .types .TestStepFinished ;
13
13
import io .cucumber .messages .types .TestStepResult ;
14
14
import io .cucumber .messages .types .TestStepResultStatus ;
15
+ import io .cucumber .query .Lineage ;
15
16
import io .cucumber .query .NamingStrategy ;
16
17
import io .cucumber .query .Query ;
17
18
@@ -69,11 +70,15 @@ private Pickle getPickle(TestCaseStarted testCaseStarted) {
69
70
}
70
71
71
72
String getPickleName (TestCaseStarted testCaseStarted ) {
72
- return query .findNameOf (getPickle (testCaseStarted ), namingStrategy );
73
+ Pickle pickle = getPickle (testCaseStarted );
74
+ return query .findLineageBy (pickle )
75
+ .map (lineage -> namingStrategy .reduce (lineage , pickle ))
76
+ .orElseGet (pickle ::getName );
73
77
}
74
78
75
79
String getFeatureName (TestCaseStarted testCaseStarted ) {
76
- return query .findFeatureBy (testCaseStarted )
80
+ return query .findLineageBy (testCaseStarted )
81
+ .flatMap (Lineage ::feature )
77
82
.map (Feature ::getName )
78
83
.orElseGet (() -> this .getPickle (testCaseStarted ).getUri ());
79
84
}
You can’t perform that action at this time.
0 commit comments