TAutomatedTest
Abstract base class for automated tests.
Inheritance
Level | Ancestor | Description |
---|---|---|
1 | TObject | Ultimate ancestor in a class hierarchy |
2 | TAutomatedTest |
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
Scope | Visibility | Type | Name | Description |
---|---|---|---|---|
Instance | private | TBoolean | AssertExceptionCalled | |
Instance | protected | TText | FName | |
Instance | protected | TAutomatedTestRuntime | FRuntime | |
Instance | protected | TInteger32 | FAssertCount |
Methods
Scope | Visibility | Result | Name | Description |
---|---|---|---|---|
Instance | private | HandleSubsequentExceptions() | ||
Instance | private | IgnoreSubsequentExceptions() | ||
Instance | protected | Fail(Message: TText) | ||
Instance | protected | AssertTrue(Condition: TBoolean; Message: TText) | ||
Instance | protected | AssertFalse(Condition: TBoolean; Message: TText) | ||
Instance | protected | AssertEqual(Value: TInteger64; Expected: TInteger64; Message: TText) | ||
Instance | protected | AssertEqual(Value: TBoolean; Expected: TBoolean; Message: TText) | ||
Instance | protected | AssertEqual(Value: TFloatingPoint64; Expected: TFloatingPoint64; Precision: TFloatingPoint64; Message: TText) | ||
Instance | protected | AssertEqual(Value: TFloatingPoint64; Expected: TFloatingPoint64; Comparator: TComparator<TFloatingPoint64>; Message: TText) | ||
Instance | protected | AssertEqual(Value: TText; Expected: TText; Message: TText) | ||
Instance | protected | AssertEqualIgnoreCase(Value: TText; Expected: TText; Message: TText) | ||
Instance | protected | AssertEqual(Value: TByteBlock; Expected: TByteBlock; Message: TText) | ||
Instance | protected | AssertAssigned(Value: TObject; Message: TText) | ||
Instance | protected | AssertUnassigned(Value: TObject; Message: TText) | ||
Instance | protected | AssertClass(Value: TObject; Class_: TClass; Message: TText) | ||
Instance | protected | StartAssertException() | ||
Instance | protected | AssertException(Value: EException; Expected: TClass; Message: TText) | ||
Instance | protected | EndAssertException() | ||
Instance | public | Create(Name: TText) | ||
Instance | public | Configure(Settings: TDomElement) | ||
Instance | public | TAutomatedTestExecutability | GetExecutability(Context: TAutomatedTestContext) | |
Instance | public | TValue | GetResult() | |
Instance | public | SetUp(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.
| |
Instance | public | TearDown() |
Clean up procedure for resources initialized in the SetUp procedure. This is called regardless of whether the tests succeeded or not.
| |
Instance | public | Execute() |