@@ -60,17 +60,19 @@ int getTestCaseCount() {
6060 return query .findAllTestCaseStarted ().size ();
6161 }
6262
63- String getPickleName (TestCaseStarted testCaseStarted ) {
64- Pickle pickle = query .findPickleBy (testCaseStarted )
63+ private Pickle getPickle (TestCaseStarted testCaseStarted ) {
64+ return query .findPickleBy (testCaseStarted )
6565 .orElseThrow (() -> new IllegalStateException ("No pickle for " + testCaseStarted .getId ()));
66+ }
6667
67- return query .findNameOf (pickle , namingStrategy );
68+ String getPickleName (TestCaseStarted testCaseStarted ) {
69+ return query .findNameOf (getPickle (testCaseStarted ), namingStrategy );
6870 }
6971
7072 String getFeatureName (TestCaseStarted testCaseStarted ) {
7173 return query .findFeatureBy (testCaseStarted )
7274 .map (Feature ::getName )
73- .orElseThrow (() -> new IllegalStateException ( "No feature for " + testCaseStarted ));
75+ .orElseGet (() -> this . getPickle ( testCaseStarted ). getUri ( ));
7476 }
7577
7678 List <Entry <String , String >> getStepsAndResult (TestCaseStarted testCaseStarted ) {
@@ -119,7 +121,7 @@ List<TestCaseStarted> getAllTestCaseStarted() {
119121 private static final TestStepResult SCENARIO_WITH_NO_STEPS = new TestStepResult (ZERO_DURATION , null , PASSED , null );
120122
121123 TestStepResult getTestCaseStatus (TestCaseStarted testCaseStarted ) {
122- return query .findMostSevereTestStepResulBy (testCaseStarted )
124+ return query .findMostSevereTestStepResultBy (testCaseStarted )
123125 .orElse (SCENARIO_WITH_NO_STEPS );
124126 }
125127
0 commit comments