Package nl.topicus.onderwijs.dashboard.datatypes.hudson

Examples of nl.topicus.onderwijs.dashboard.datatypes.hudson.Action


  @Override
  public Integer getValue() {
    class UnitTestComparator implements Comparator<Build> {
      @Override
      public int compare(Build o1, Build o2) {
        Action test1 = getTestReport(o1);
        Action test2 = getTestReport(o2);

        if (test1 == null && test2 == null)
          return 0;
        if (test1 == null)
          return 1;
        if (test2 == null)
          return -1;
        return test1.getTotalCount() - test2.getTotalCount();
      }

    }
    List<Build> builds = service.getBuilds(project);

    if (builds.isEmpty())
      return null;

    Build buildWithMaxUnitTests = Collections.max(builds,
        new UnitTestComparator());

    Action testReport = getTestReport(buildWithMaxUnitTests);
    return testReport == null ? null : testReport.getTotalCount();
  }
View Full Code Here


  @Override
  public Integer getValue() {
    class UnitTestComparator implements Comparator<Build> {
      @Override
      public int compare(Build o1, Build o2) {
        Action test1 = getTestReport(o1);
        Action test2 = getTestReport(o2);

        if (test1 == null && test2 == null)
          return 0;
        if (test1 == null)
          return 1;
        if (test2 == null)
          return -1;
        return test1.getTotalCount() - test2.getTotalCount();
      }
View Full Code Here

TOP

Related Classes of nl.topicus.onderwijs.dashboard.datatypes.hudson.Action

Copyright © 2018 www.massapicom. 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.