#include <TestCase.h>
Inheritance diagram for KXQTS::TestCase:


Public Types | |
| enum | Scenario { Standard = 1, ParseError = 2, RuntimeError = 4, Trivial = 8, AnyError = RuntimeError | ParseError } |
Public Member Functions | |
| virtual void | appendChild (TreeItem *) |
| virtual TestBaseLine::List | baseLines () const=0 |
| virtual TreeItem * | child (const unsigned int) const |
| virtual unsigned int | childCount () const |
| virtual TreeItem::List | children () const |
| virtual QString | creator () const=0 |
| virtual QString | description () const=0 |
| virtual TestResult::List | execute (const ExecutionMode mode, const ExecutionStage stage, TestSuite *ts) |
| virtual Patternist::ExternalVariableLoader::Ptr | externalVariableLoader () const=0 |
| virtual bool | isFinalNode () const |
| virtual bool | isXPath () const=0 |
| virtual QDate | lastModified () const=0 |
| virtual QString | name () const=0 |
| virtual ResultSummary | resultSummary () const |
| virtual Scenario | scenario () const=0 |
| virtual QString | sourceCode (bool &ok) const=0 |
| TestCase () | |
| virtual QUrl | testCasePath () const=0 |
| virtual TestResult * | testResult () const |
| virtual QString | title () const=0 |
| void | toXML (XMLWriter &receiver) const |
| virtual | ~TestCase () |
Static Public Member Functions | |
| static QString | displayName (const Scenario scen) |
| static Scenario | scenarioFromString (const QString &string) |
Definition at line 40 of file TestCase.h.
Corresponds to the simpleType test:scenarios-enum
Definition at line 46 of file TestCase.h.
| void TestCase::appendChild | ( | TreeItem * | ) | [virtual] |
Calling this function makes no sense, so it always performs an Q_ASSERT check.
Implements KXQTS::TreeItem.
Definition at line 503 of file TestCase.cpp.
| virtual TestBaseLine::List KXQTS::TestCase::baseLines | ( | ) | const [pure virtual] |
Implemented in KXQTS::XQTSTestCase, and KXQTS::UserTestCase.
Referenced by toXML().
Here is the caller graph for this function:

| TreeItem * TestCase::child | ( | const unsigned | int | ) | const [virtual] |
Calling this function makes no sense, so it always performs an Q_ASSERT check.
Implements KXQTS::TreeItem.
Definition at line 508 of file TestCase.cpp.
| unsigned int TestCase::childCount | ( | ) | const [virtual] |
| TreeItem::List TestCase::children | ( | ) | const [virtual] |
Implements KXQTS::TreeItem.
Definition at line 514 of file TestCase.cpp.
| virtual QString KXQTS::TestCase::creator | ( | ) | const [pure virtual] |
The full name of the creator of the test case. For example, "Frans Englich".
Implemented in KXQTS::XQTSTestCase, and KXQTS::UserTestCase.
Referenced by KXQTS::TestCaseView::displayTestCase(), and toXML().
Here is the caller graph for this function:

| virtual QString KXQTS::TestCase::description | ( | ) | const [pure virtual] |
A description of the test case for human consumption.
Implemented in KXQTS::XQTSTestCase, and KXQTS::UserTestCase.
Referenced by KXQTS::TestCaseView::displayTestCase(), and toXML().
Here is the caller graph for this function:

| TestResult::List TestCase::execute | ( | const ExecutionMode | mode, | |
| const ExecutionStage | stage, | |||
| TestSuite * | ts | |||
| ) | [virtual] |
Executes the test, and returns the result. The returned list will always contain exactly one TestResult.
stage is ignored when running out-of-process.
Implements KXQTS::TestItem.
Definition at line 57 of file TestCase.cpp.
References KXQTS::TestItem::InProcess, name(), KXQTS::TestItem::OutOfProcess, and KXQTS::TestItem::RunFailsafe.
Here is the call graph for this function:

| bool TestCase::isFinalNode | ( | ) | const [virtual] |
| virtual bool KXQTS::TestCase::isXPath | ( | ) | const [pure virtual] |
Whether this test case only make use of XPath features.
false if the test case exercises any XQuery feature which is not available in XPath 2.0. Implemented in KXQTS::XQTSTestCase, and KXQTS::UserTestCase.
Referenced by KXQTS::TestCaseView::displayTestCase(), and toXML().
Here is the caller graph for this function:

| virtual QDate KXQTS::TestCase::lastModified | ( | ) | const [pure virtual] |
The date of when the test case was created or last modified.
Implemented in KXQTS::XQTSTestCase, and KXQTS::UserTestCase.
Referenced by KXQTS::TestCaseView::displayTestCase().
| virtual QString KXQTS::TestCase::name | ( | ) | const [pure virtual] |
The test case's identifier. For example, "Literals001".
Implemented in KXQTS::XQTSTestCase, and KXQTS::UserTestCase.
Referenced by execute(), and toXML().
Here is the caller graph for this function:

| TestItem::ResultSummary TestCase::resultSummary | ( | ) | const [virtual] |
Implements KXQTS::TestItem.
Definition at line 494 of file TestCase.cpp.
References KXQTS::TestResult::Pass.
| virtual Scenario KXQTS::TestCase::scenario | ( | ) | const [pure virtual] |
What kind of test this is. For example, whether the test case should result in a parser error or should evaluate without errors.
The vast common case is that one Scenario is returned; the bit signifiance is for the TestCase sub-class UserTestCase.
Implemented in KXQTS::XQTSTestCase, and KXQTS::UserTestCase.
Referenced by KXQTS::TestCaseView::displayTestCase(), and toXML().
Here is the caller graph for this function:

| TestCase::Scenario TestCase::scenarioFromString | ( | const QString & | string | ) | [static] |
Determines the corresponding Scenario enumerator from the string representation string.
The following mappings are in effect:
Standard "standard" ParseError "parse-error" RuntimeError "runtime-error" Definition at line 384 of file TestCase.cpp.
References ParseError, RuntimeError, and Standard.
Referenced by KXQTS::TestSuiteHandler::startElement().
Here is the caller graph for this function:

| virtual QString KXQTS::TestCase::sourceCode | ( | bool & | ok | ) | const [pure virtual] |
The test's source code. That is, the XPath/XQuery code for the test.
| ok | the function sets this value to false if loading the query failed, and returns a description of the error for human consumption. If everything went ok, ok is set to true, and the query is returned. |
Implemented in KXQTS::XQTSTestCase, and KXQTS::UserTestCase.
Referenced by KXQTS::TestCaseView::displayTestCase().
| virtual QUrl KXQTS::TestCase::testCasePath | ( | ) | const [pure virtual] |
The path to the file containing the code of the test case.
Implemented in KXQTS::XQTSTestCase, and KXQTS::UserTestCase.
Referenced by toXML().
Here is the caller graph for this function:

| virtual QString KXQTS::TestCase::title | ( | ) | const [pure virtual] |
The title of the test. This can be the identifier of the test, for example.
Implemented in KXQTS::XQTSTestCase, and KXQTS::UserTestCase.
Referenced by KXQTS::TestCaseView::displayTestCase().
1.5.1