@@ -63,17 +63,19 @@ int getTestCaseCount() {
6363 return query .findAllTestCaseStarted ().size ();
6464 }
6565
66- String getPickleName (TestCaseStarted testCaseStarted ) {
67- Pickle pickle = query .findPickleBy (testCaseStarted )
66+ private Pickle getPickle (TestCaseStarted testCaseStarted ) {
67+ return query .findPickleBy (testCaseStarted )
6868 .orElseThrow (() -> new IllegalStateException ("No pickle for " + testCaseStarted .getId ()));
69+ }
6970
70- return query .findNameOf (pickle , namingStrategy );
71+ String getPickleName (TestCaseStarted testCaseStarted ) {
72+ return query .findNameOf (getPickle (testCaseStarted ), namingStrategy );
7173 }
7274
7375 String getFeatureName (TestCaseStarted testCaseStarted ) {
7476 return query .findFeatureBy (testCaseStarted )
7577 .map (Feature ::getName )
76- .orElseThrow (() -> new IllegalStateException ( "No feature for " + testCaseStarted ));
78+ .orElseGet (() -> this . getPickle ( testCaseStarted ). getUri ( ));
7779 }
7880
7981 List <Entry <String , String >> getStepsAndResult (TestCaseStarted testCaseStarted ) {
@@ -122,7 +124,7 @@ List<TestCaseStarted> getAllTestCaseStarted() {
122124 private static final TestStepResult SCENARIO_WITH_NO_STEPS = new TestStepResult (ZERO_DURATION , null , PASSED , null );
123125
124126 TestStepResult getTestCaseStatus (TestCaseStarted testCaseStarted ) {
125- return query .findMostSevereTestStepResulBy (testCaseStarted )
127+ return query .findMostSevereTestStepResultBy (testCaseStarted )
126128 .orElse (SCENARIO_WITH_NO_STEPS );
127129 }
128130
0 commit comments