Przeglądaj źródła

* Improved comments in toolsunit. Mantis #21910, patch by Reinier Olislagers

git-svn-id: trunk@21199 -
marco 13 lat temu
rodzic
commit
614a192d87
1 zmienionych plików z 12 dodań i 8 usunięć
  1. 12 8
      packages/fcl-db/tests/toolsunit.pas

+ 12 - 8
packages/fcl-db/tests/toolsunit.pas

@@ -8,7 +8,9 @@ interface
 
 uses
   Classes, SysUtils, DB, testdecorator;
-  
+
+// Number of "N" test datasets (as opposed to FieldDatasets) that will be created
+// The connectors should have these records prepared in their Create*Dataset procedures.
 Const MaxDataSet = 35;
   
 type
@@ -24,14 +26,16 @@ type
      protected
        procedure SetTestUniDirectional(const AValue: boolean); virtual;
        function GetTestUniDirectional: boolean; virtual;
-       // These methods should be implemented by any descendents
-       // They are called eacht time a test need a TDataset descendent
+       // These methods should be implemented by all descendents
+       // They are called each time a test needs a TDataset descendent
+       // n: the dataset index to return (also number of records in set)
+       // Presupposes that Create*Dataset(s) has been called already.
        Function InternalGetNDataset(n : integer) : TDataset;  virtual; abstract;
        Function InternalGetFieldDataset : TDataSet; virtual; abstract;
 
-       // These methods should be implemented by any descendents
-       // They are called only once in the constructor. They can be used
-       // to create the tables on disk, or on a DB-Server
+       // These methods should be implemented by all descendents
+       // They are called e.g. in the constructor. They can be used
+       // to create the tables on disk, or on a DB server
        procedure CreateNDatasets; virtual; abstract;
        procedure CreateFieldDataset; virtual; abstract;
 
@@ -41,8 +45,8 @@ type
        procedure ResetNDatasets; virtual;
        procedure ResetFieldDataset; virtual;
        
-       // These methods are called only once in the destructor.
-       // They should clean up all mess, like tables on disk or on a DB-server
+       // These methods are called e.g. in the destructor.
+       // They should clean up all mess, like tables on disk or on a DB server
        procedure DropNDatasets; virtual; abstract;
        procedure DropFieldDataset; virtual; abstract;
      public