org.w3c.mwi.mobileok.basic
Class TestResults

java.lang.Object
  extended by org.w3c.mwi.mobileok.basic.TestResults

public final class TestResults
extends java.lang.Object

Encapsulates tests outcomes.

The final report returned by the mobileOK Checker is an instance of the TestResults class, filled out with the outcomes of the tests that were run on the Web resource under test.

Each test outcome is an instance of the TestResult class. The mobileOK Checker creates one instance per test run on the Web resource, no matter whether the test PASSed or FAILed (in other words, the number of TestResult in the final report equals the number of tests that were run)

The getOverallOutcome() method is useful to quickly find out whether the Web resource that was tested passed all the tests or not. The getTestResultsDOM() method returns the report as a DOM tree.

Version:
$Revision: 1.2 $
Author:
The W3C mobileOK Checker Task Force
See Also:
TestResult

Field Summary
private  java.net.URI mokiURI
           
private  TestOutcome overallOutcome
           
private  java.util.List<TestResult> resultsList
           
private  java.util.Map<java.lang.String,TestResult> resultsMap
           
private  org.w3c.dom.Document testResultsDOM
           
 
Constructor Summary
TestResults()
           
 
Method Summary
(package private)  void addTestResult(TestResult result)
           
private  org.w3c.dom.Document buildTestResultsDOM()
           
(package private)  void clear()
           
 java.util.List<TestResult> getAllResults()
           
 java.net.URI getMokiURI()
           
 TestOutcome getOverallOutcome()
           
 TestResult getResultForTest(java.lang.String type)
           
 org.w3c.dom.Document getTestResultsDOM()
           
 void setMokiURI(java.net.URI mokiURI)
           
(package private)  void setOverallOutcome(TestOutcome overallOutcome)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

overallOutcome

private TestOutcome overallOutcome

mokiURI

private java.net.URI mokiURI

resultsList

private final java.util.List<TestResult> resultsList

resultsMap

private final java.util.Map<java.lang.String,TestResult> resultsMap

testResultsDOM

private org.w3c.dom.Document testResultsDOM
Constructor Detail

TestResults

TestResults()
Method Detail

addTestResult

void addTestResult(TestResult result)

setOverallOutcome

void setOverallOutcome(TestOutcome overallOutcome)

getOverallOutcome

public TestOutcome getOverallOutcome()

getMokiURI

public java.net.URI getMokiURI()

setMokiURI

public void setMokiURI(java.net.URI mokiURI)

getAllResults

public java.util.List<TestResult> getAllResults()

getResultForTest

public TestResult getResultForTest(java.lang.String type)

getTestResultsDOM

public org.w3c.dom.Document getTestResultsDOM()
                                       throws TestException
Throws:
TestException

buildTestResultsDOM

private org.w3c.dom.Document buildTestResultsDOM()
                                          throws TestException
Throws:
TestException

clear

void clear()