DataProvider

This commit is contained in:
Michael Schimmel
2025-06-23 12:09:26 +02:00
parent a9aff8c41a
commit 6c7cc2569b
9 changed files with 483 additions and 24 deletions
+5 -5
View File
@@ -19,7 +19,7 @@ type
[IgnoreMemoryLeaks(true)]
TTest_TABFileServer_Equivalence = class(TObject)
private
FServer: IAuraDataServer<TAskBidItem>;
FServer: IDataServer<TAskBidItem>;
FStream: IDataStream<TAskBidItem>;
public
[SetupFixture]
@@ -83,14 +83,14 @@ var
n: Integer;
cnt: Int64;
timeout: Integer;
filename: string;
filename: TAuraDataFile;
expectedData: TArray<TDataPoint<TAskBidItem>>;
begin
// 1. Expected data is loaded directly using LoadDataSeries.
filename := (FServer as TAuraDataServer<TAskBidItem>).FindFirstDataFile(C_TEST_SYMBOL);
Assert.IsNotEmpty(filename, 'Test data file could not be found.');
filename := (FServer as TAuraDataServer<TAskBidItem>).FindFirstFile(C_TEST_SYMBOL).WaitFor;
Assert.IsTrue(filename.IsValid, 'Test data file could not be found.');
expectedData := FServer.LoadDataSeries(filename).WaitFor;
expectedData := (FServer as TAuraTABFileServer).LoadDataSeries(filename).WaitFor;
SetLength(dst, Length(expectedData));
// 2. Fetch data chunks from the stream until all data is retrieved.