private void processQualityUTScore(
    ScoreComponentSettings qualityUTSettings,
    Iterable<CodeQuality> codeQualityIterable,
    List<ScoreWeight> categoryScores) {
    ScoreWeight qualityUTScore = getCategoryScoreByIdName(categoryScores, WIDGET_QUALITY_UT_ID_NAME);
    Double qualityUTRatio = fetchQualityValue(codeQualityIterable, QUALITY_PARAM_UT);

    if (null == qualityUTRatio) {
      qualityUTScore.setScore(
        qualityUTSettings.getCriteria().getNoDataFound()
      );
      qualityUTScore.setMessage(Constants.SCORE_ERROR_NO_DATA_FOUND);
      qualityUTScore.setState(ScoreWeight.ProcessingState.criteria_failed);
    } else {
      try {
        //Check thresholds at widget level
        checkPercentThresholds(qualityUTSettings, qualityUTRatio);
        qualityUTScore.setScore(
          new ScoreTypeValue(qualityUTRatio)
        );
        qualityUTScore.setState(ScoreWeight.ProcessingState.complete);
      } catch (ThresholdException ex) {
        setThresholdFailureWeight(ex, qualityUTScore);
      }
    }
  }
private void processQualityUTScore ( ScoreComponentSettings qualityUTSettings , Iterable < CodeQuality > codeQualityIterable , List < ScoreWeight > categoryScores ) { ScoreWeight qualityUTScore = getCategoryScoreByIdName ( categoryScores , WIDGET_QUALITY_UT_ID_NAME ) ; Double qualityUTRatio = fetchQualityValue ( codeQualityIterable , QUALITY_PARAM_UT ) ; if ( null == qualityUTRatio ) { qualityUTScore . setScore ( qualityUTSettings . getCriteria ( ) . getNoDataFound ( ) ) ; qualityUTScore . setMessage ( Constants . SCORE_ERROR_NO_DATA_FOUND ) ; qualityUTScore . setState ( ScoreWeight . ProcessingState . criteria_failed ) ; } else { try { checkPercentThresholds ( qualityUTSettings , qualityUTRatio ) ; qualityUTScore . setScore ( new ScoreTypeValue ( qualityUTRatio ) ) ; qualityUTScore . setState ( ScoreWeight . ProcessingState . complete ) ; } catch ( ThresholdException ex ) { setThresholdFailureWeight ( ex , qualityUTScore ) ; } } }
Process Unit Tests score

@param qualityUTSettings Unit Tests Param Settings
@param codeQualityIterable Quality values
@param categoryScores List of category scores