Class SimpleCaseResult

    • Field Detail

      • duration

        protected float duration
      • EMPTY_ACTION_LIST

        public static final List<TestAction> EMPTY_ACTION_LIST
        An empty list of actions, useful for tests
    • Constructor Detail

      • SimpleCaseResult

        public SimpleCaseResult​(float duration)
      • SimpleCaseResult

        public SimpleCaseResult()
    • Method Detail

      • setParentAction

        public void setParentAction​(AbstractTestResultAction parentAction)
        Sets the parent action, which means the action that binds this particular case result to a build. Should not be null.
        Overrides:
        setParentAction in class TestResult
        Parameters:
        parentAction -
      • getParentAction

        public AbstractTestResultAction getParentAction()
        Description copied from class: TestResult
        Returns the action that points to the top level test result includes this test result.
        Overrides:
        getParentAction in class TestResult
        Returns:
        action The action that points to the top level test result.
      • findCorrespondingResult

        public TestResult findCorrespondingResult​(String id)
        Description copied from class: TestObject
        Find the test result corresponding to the one identified by id within this test result.
        Specified by:
        findCorrespondingResult in class TestObject
        Parameters:
        id - The path to the original test result
        Returns:
        A corresponding test result, or null if there is no corresponding result.
      • getFailedTests

        public Collection<? extends TestResult> getFailedTests()
        Gets the "children" of this test result that failed
        Overrides:
        getFailedTests in class TestResult
        Returns:
        the children of this test result, if any, or an empty collection
      • getPassedTests

        public Collection<? extends TestResult> getPassedTests()
        Gets the "children" of this test result that passed
        Overrides:
        getPassedTests in class TestResult
        Returns:
        the children of this test result, if any, or an empty collection
      • getSkippedTests

        public Collection<? extends TestResult> getSkippedTests()
        Gets the "children" of this test result that were skipped
        Overrides:
        getSkippedTests in class TestResult
        Returns:
        the children of this test result, if any, or an empty list
      • isPassed

        public boolean isPassed()
        Let's pretend that our trivial test result always passes.
        Overrides:
        isPassed in class TestResult
        Returns:
        always true
      • isSkipped

        public boolean isSkipped()
        Tests whether the test was skipped or not.
        Returns:
        true if the test was not executed, false otherwise.
      • isFailed

        public boolean isFailed()
        Returns true iff this test failed.
      • getDuration

        public float getDuration()
        Time took to run this test. In seconds.
        Overrides:
        getDuration in class TestResult
        Returns:
        the time in seconds the test ran.
      • getName

        public String getName()
        Gets the name of this object.
        Overrides:
        getName in class TestObject
        Returns:
        the name of this object.
      • getPassCount

        public int getPassCount()
        Gets the total number of passed tests.
        Overrides:
        getPassCount in class TestResult
        Returns:
        the total number of passed tests.
      • getFailCount

        public int getFailCount()
        Gets the total number of failed tests.
        Overrides:
        getFailCount in class TestResult
        Returns:
        the total number of failed tests.
      • getSkipCount

        public int getSkipCount()
        Gets the total number of skipped tests.
        Overrides:
        getSkipCount in class TestResult
        Returns:
        the total number of skipped tests.
      • getTitle

        public String getTitle()
        Gets the human readable title of this result object.
        Overrides:
        getTitle in class TestResult
        Returns:
        the human readable title of this result object.
      • getDisplayName

        public String getDisplayName()
      • getRun

        public Run<?,​?> getRun()
        Overrides:
        getRun in class TestObject
        Returns:
        the run in which this test was executed.