TAutomatedTest

Abstract base class for automated tests.

Inheritance

LevelAncestorDescription
1TObjectUltimate ancestor in a class hierarchy
2TAutomatedTest

Source

AutomatedTest.pas (47)

Description

By implementing Execute descendant classes can fit automated tests into the testing framework. A test indicates its expected Runtime which can be used by test executors to determine whether a test should be executed or not. Implementations can use the Assert...() functions to test actual values against expected values.

Fields

ScopeVisibilityTypeNameDescription
InstanceprivateTBooleanAssertExceptionCalled
InstanceprotectedTTextFName
InstanceprotectedTAutomatedTestRuntimeFRuntime
InstanceprotectedTInteger32FAssertCount

Methods

ScopeVisibilityResultNameDescription
InstanceprivateHandleSubsequentExceptions()
InstanceprivateIgnoreSubsequentExceptions()
InstanceprotectedFail(Message: TText)
InstanceprotectedAssertTrue(Condition: TBoolean; Message: TText)
InstanceprotectedAssertFalse(Condition: TBoolean; Message: TText)
InstanceprotectedAssertEqual(Value: TInteger64; Expected: TInteger64; Message: TText)
InstanceprotectedAssertEqual(Value: TBoolean; Expected: TBoolean; Message: TText)
InstanceprotectedAssertEqual(Value: TFloatingPoint64; Expected: TFloatingPoint64; Precision: TFloatingPoint64; Message: TText)
InstanceprotectedAssertEqual(Value: TFloatingPoint64; Expected: TFloatingPoint64; Comparator: TComparator<TFloatingPoint64>; Message: TText)
InstanceprotectedAssertEqual(Value: TText; Expected: TText; Message: TText)
InstanceprotectedAssertEqualIgnoreCase(Value: TText; Expected: TText; Message: TText)
InstanceprotectedAssertEqual(Value: TByteBlock; Expected: TByteBlock; Message: TText)
InstanceprotectedAssertAssigned(Value: TObject; Message: TText)
InstanceprotectedAssertUnassigned(Value: TObject; Message: TText)
InstanceprotectedAssertClass(Value: TObject; Class_: TClass; Message: TText)
InstanceprotectedStartAssertException()
InstanceprotectedAssertException(Value: EException; Expected: TClass; Message: TText)
InstanceprotectedEndAssertException()
InstancepublicCreate(Name: TText)
InstancepublicConfigure(Settings: TDomElement)
InstancepublicTAutomatedTestExecutabilityGetExecutability(Context: TAutomatedTestContext)
InstancepublicTValueGetResult()
InstancepublicSetUp(Context: TAutomatedTestContext) Set up the resources required for the test to run. Resources allocated in the SetUp procedure should be cleaned up in the TearDown procedure.
InstancepublicTearDown() Clean up procedure for resources initialized in the SetUp procedure. This is called regardless of whether the tests succeeded or not.
InstancepublicExecute()