public EndState getEndState ( ) { EndState result = EndState . PASSED ; for ( ScenarioToken s : scenarios ) { if ( s . getEndState ( ) == EndState . FAILED ) { result = EndState . FAILED ; break ; } } if ( result != EndState . FAILED ) { for ( ScenarioToken s : scenarios ) { if ( s . getEndState ( ) == EndState . PENDING ) { result = EndState . PENDING ; } } } return result ; }
fail if any scenarios failed otherwise pending if any pending or passed