mn8 Language Reference | Index    

TestResult

SUMMARY: NO ATTRIBUTES  ELEMENTS SUMMARY  CONSTRUCTORS SUMMARY  NO OPERATORS  METHODS SUMMARYDETAIL: NO ATTRIBUTES  ELEMENT DETAILS  CONSTRUCTOR DETAILS  NO OPERATORS  METHOD DETAILS

Description

A TestResult collects the results of executing a test case. It is an instance of the Collecting Parameter pattern. The test framework distinguishes between failures and errors. A failure is anticipated and checked for with assertions. Errors are unanticipated problems like an Error concept. (not yet implemented)

Usage

Version: 0.1
Authors:Antal Attila ()
Location:
Inherits: Concept

Element List

static fFailures TYPEOF Series LABEL "fFailures"
static fErrors TYPEOF Series LABEL "fErrors"
static fListeners TYPEOF Series LABEL "fListeners"
static fRunTests TYPEOF Integer LABEL "fRunTests"
static fStop TYPEOF Logical LABEL "fStop"
top

Constructor List

create
top

Method List

addError (Test $test, String $t)
addFailure (Test $test, String $t)
addListener (TestListener $listener)
endTest (Test $test)
IntegererrorCount
Serieserrors
IntegerfailureCount
Seriesfailures
removeListener (TestListener $listener)
run (TestCase $test)
IntegerrunCount
IntegerrunTests
LogicalshouldStop
startTest (Test $test)
stop
IntegertestErrors
IntegertestFailures
LogicalwasSuccesful
top
Methods inherited from: Concept
cloneConcept, extendsConcept, fromXML, getAllInheritedConcepts, getConceptAttribute, getConceptAttributeField, getConceptAttributeFields, getConceptAttributes, getConceptConstructors, getConceptElement, getConceptElementField, getConceptElementFields, getConceptElements, getConceptLabel, getConceptMethod, getConceptMethods, getConceptOperators, getConceptType, getErrorHandler, getInheritedConcepts, getResourceURI, hasConceptAttribute, hasConceptElement, hasConceptMethod, hasPath, isHidden, loadContent, setConceptLabel, setErrorHandler, setHidden, setShowEmpty, showEmpty, toTXT, toXML, setResourceURI

Detailed Element Info

fFailures

Label:fFailures
Type:Series
Is Static:true
Is Hidden:false
Is Multi:false
Show Empty:true

It holds the failured Tests

top

fErrors

Label:fErrors
Type:Series
Is Static:true
Is Hidden:false
Is Multi:false
Show Empty:true

It holds the errored Tests

top

fListeners

Label:fListeners
Type:Series
Is Static:true
Is Hidden:false
Is Multi:false
Show Empty:true

It holds the listeners

top

fRunTests

Label:fRunTests
Type:Integer
Is Static:true
Is Hidden:false
Is Multi:false
Show Empty:true

Number of tests

top

fStop

Label:fStop
Type:Logical
Is Static:true
Is Hidden:false
Is Multi:false
Show Empty:true

Tests run stop flag

top

Detailed Constructor Info

create

Constructs the instance

top

Detailed Method Info

addError (Test $test, String $t)
Parameters:
$test :Test concept
$t :Error message
Returns:

Adds an error to the list of errors. The passed in error message caused the error.

top
addFailure (Test $test, String $t)
Parameters:
$test :Test concept
$t :Fail message
Returns:

Adds a failure to the list of failures. The passed in fail message caused the failure.

top
addListener (TestListener $listener)
Parameters:
$listener :TestListener concept
Returns:

Registers a TestListener

top
endTest (Test $test)
Parameters:
$test :Test concept
Returns:

Informs the result that a test was completed.

top
errorCount
Returns: Integer

Gets the number of detected errors.

top
errors
Returns: Series

Returns an Series for the errors

top
failureCount
Returns: Integer

Gets the number of detected failures.

top
failures
Returns: Series

Returns an Series for the failures

top
removeListener (TestListener $listener)
Parameters:
$listener :TestListener concept
Returns:

Unregisters a TestListener

top
run (TestCase $test)
Parameters:
$test :
Returns:

Runs a TestCase.

top
runCount
Returns: Integer

Gets the number of run tests.

top
runTests
Returns: Integer

Gets the number of run tests.

top
shouldStop
Returns: Logical

Checks whether the test run should stop

top
startTest (Test $test)
Parameters:
$test :
Returns:

Informs the result that a test will be started.

top
stop
Returns:

Marks that the test run should stop.

top
testErrors
Returns: Integer

Gets the number of detected errors.

top
testFailures
Returns: Integer

Gets the number of detected failures.

top
wasSuccesful
Returns: Logical

Returns whether the entire test was successful or not.

top