com.atlassian.bamboo.build
Class DefaultTestResultManager

java.lang.Object
  extended by com.atlassian.bamboo.build.DefaultTestResultManager
All Implemented Interfaces:
TestResultManager

public class DefaultTestResultManager
extends java.lang.Object
implements TestResultManager


Constructor Summary
DefaultTestResultManager()
           
 
Method Summary
 BuildResults getBuildFailingSince(BuildResults buildResults, TestResults testResults)
          Given a build results with test result, finds the build result for which this failing test has been failing since.
 BuildResults getBuildSuccessfulSince(TestCase testCase)
           
 TestCaseResultWrapper getLastTestCaseResult(TestCase testCase)
           
 TestCaseResultWrapper getTestCaseResult(BuildResults buildResults, java.lang.String key)
          Finds a TestCaseResultWrapper given a test case key and a BuildResultsImpl
 TestClassResultWrapper getTestClassResult(BuildResults buildResults, java.lang.String key)
          Finds a TestClassResultWrapper given a test class key and a BuildResultsImpl
 boolean isTestFailedForBuild(BuildResults buildResults, TestResults testResults)
          Checks to see if a given TestResults is failing in a given BuildResultsImpl
 void setBuildManager(BuildManager buildManager)
           
 java.util.List wrapTestCaseResults(java.util.List testResults, BuildResults buildResults)
          Wraps up a List of TestResults object into a List of TestCaseResultWrapper objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTestResultManager

public DefaultTestResultManager()
Method Detail

getBuildFailingSince

public BuildResults getBuildFailingSince(BuildResults buildResults,
                                         TestResults testResults)
Description copied from interface: TestResultManager
Given a build results with test result, finds the build result for which this failing test has been failing since.

Specified by:
getBuildFailingSince in interface TestResultManager
Parameters:
buildResults - - build results to count the failing unitl
testResults - - the test result representing the test case
Returns:
BuildResultsImpl for which this test first failed.

isTestFailedForBuild

public boolean isTestFailedForBuild(BuildResults buildResults,
                                    TestResults testResults)
Description copied from interface: TestResultManager
Checks to see if a given TestResults is failing in a given BuildResultsImpl

Specified by:
isTestFailedForBuild in interface TestResultManager
Returns:
boolean failed = true, not failed = false;

getTestCaseResult

public TestCaseResultWrapper getTestCaseResult(BuildResults buildResults,
                                               java.lang.String key)
Description copied from interface: TestResultManager
Finds a TestCaseResultWrapper given a test case key and a BuildResultsImpl

Specified by:
getTestCaseResult in interface TestResultManager
Returns:
a TestCaseResultWrapper which wraps around the underlying TestResults

wrapTestCaseResults

public java.util.List wrapTestCaseResults(java.util.List testResults,
                                          BuildResults buildResults)
Description copied from interface: TestResultManager
Wraps up a List of TestResults object into a List of TestCaseResultWrapper objects.

Specified by:
wrapTestCaseResults in interface TestResultManager
Parameters:
testResults - List of TestResults
Returns:
the List of wrapped TestCaseResultWrapper

getBuildSuccessfulSince

public BuildResults getBuildSuccessfulSince(TestCase testCase)
Specified by:
getBuildSuccessfulSince in interface TestResultManager

getLastTestCaseResult

public TestCaseResultWrapper getLastTestCaseResult(TestCase testCase)
Specified by:
getLastTestCaseResult in interface TestResultManager

getTestClassResult

public TestClassResultWrapper getTestClassResult(BuildResults buildResults,
                                                 java.lang.String key)
Description copied from interface: TestResultManager
Finds a TestClassResultWrapper given a test class key and a BuildResultsImpl

Specified by:
getTestClassResult in interface TestResultManager
Parameters:
buildResults -
key -
Returns:

setBuildManager

public void setBuildManager(BuildManager buildManager)


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.