@@ -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 ) {
@@ -119,7 +121,7 @@ List<TestCaseStarted> getAllTestCaseStarted() {
119
121
private static final TestStepResult SCENARIO_WITH_NO_STEPS = new TestStepResult (ZERO_DURATION , null , PASSED , null );
120
122
121
123
TestStepResult getTestCaseStatus (TestCaseStarted testCaseStarted ) {
122
- return query .findMostSevereTestStepResulBy (testCaseStarted )
124
+ return query .findMostSevereTestStepResultBy (testCaseStarted )
123
125
.orElse (SCENARIO_WITH_NO_STEPS );
124
126
}
125
127
0 commit comments