Examples of Ratio


Examples of hudson.plugins.cobertura.Ratio

    }

    public Set<CoverageMetric> getFailingMetrics(CoverageResult coverage) {
        Set<CoverageMetric> result = EnumSet.noneOf(CoverageMetric.class);
        for (Map.Entry<CoverageMetric, Integer> target : this.targets.entrySet()) {
            Ratio observed = coverage.getCoverage(target.getKey());
            if (observed != null && roundFloatDecimal(observed.getPercentageFloat()) < (float) (target.getValue() / 100000f)) {
                result.add(target.getKey());
            }
        }

        return result;
View Full Code Here

Examples of hudson.plugins.cobertura.Ratio

    }

    public Set<CoverageMetric> getAllMetrics(CoverageResult coverage) {
        Set<CoverageMetric> result = EnumSet.noneOf(CoverageMetric.class);
        for (Map.Entry<CoverageMetric, Integer> target : this.targets.entrySet()) {
            Ratio observed = coverage.getCoverage(target.getKey());
            if (observed != null) {
                result.add(target.getKey());
            }
        }
View Full Code Here

Examples of hudson.plugins.cobertura.Ratio

        return result;
    }

    public float getObservedPercent(CoverageResult coverage, CoverageMetric key) {
        for (Map.Entry<CoverageMetric, Integer> target : this.targets.entrySet()) {
            Ratio observed = coverage.getCoverage(target.getKey());
            if (target.getKey() == key) {
                return roundFloatDecimal(observed.getPercentageFloat());
            }
        }
        return 0;
    }
View Full Code Here

Examples of hudson.plugins.cobertura.Ratio

    public Map<CoverageMetric, Integer> getRangeScores(CoverageTarget min, Map<CoverageMetric, Ratio> results) {
        Integer j;
        Map<CoverageMetric, Integer> result = new EnumMap<CoverageMetric, Integer>(CoverageMetric.class);
        for (Map.Entry<CoverageMetric, Integer> target : this.targets.entrySet()) {
            Ratio observed = results.get(target.getKey());
            if (observed != null) {
                j = CoverageTarget.calcRangeScore(target.getValue() / 100000, min.targets.get(target.getKey()), observed.getPercentage());
                result.put(target.getKey(), Integer.valueOf(j));
            }
        }
        return result;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.