[Lazarus] TTestSuite
Graeme Geldenhuys
graemeg.lists at gmail.com
Tue Feb 10 08:58:53 CET 2009
On Tue, Feb 10, 2009 at 6:02 AM, Lee Jenkins <lee at datatrakpos.com> wrote:
>
> Would anyone mind providing a simple example or useful link? I've already
> looked at this:
You can also register the tests with better descriptions and test
decorators. I use the latter for a shared DB connection. The
identifiers starting with cXXXXXX are constants. This is code I use
in our company test suite.
procedure AddToNonPersistentTestSuite(ATest: TTest);
begin
RegisterTest(cNonPersistentTests, ATest);
end;
procedure AddToNonPersistentTestSuite(ATestClass: TTestCaseClass);
begin
RegisterTest(cNonPersistentTests, ATestClass);
end;
procedure AddToSQLDatabaseTestSuite(ADecoratorClass: TTestDecoratorClass;
ATestClass: TTestCaseClass);
begin
RegisterTest(cSQLDatabaseTests,
ADecoratorClass.Create(TTestSuite.Create(ATestClass)));
end;
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
More information about the Lazarus
mailing list