TDataSeries<T>
This commit is contained in:
@@ -256,23 +256,23 @@ begin
|
||||
FNotifier.Lock;
|
||||
try
|
||||
FNotifier.Notify(
|
||||
function(Item: IMyTestInterface): Boolean
|
||||
begin
|
||||
Inc(currentNotifyCount);
|
||||
Result := True; // Keep item in the Notifier
|
||||
end
|
||||
function(Item: IMyTestInterface): Boolean
|
||||
begin
|
||||
Inc(currentNotifyCount);
|
||||
Result := True; // Keep item in the Notifier
|
||||
end
|
||||
);
|
||||
finally
|
||||
FNotifier.Release;
|
||||
end;
|
||||
Assert.AreEqual(
|
||||
totalAdvisedExpected,
|
||||
currentNotifyCount,
|
||||
'The number of items in the Notifier after all Advise operations ('
|
||||
+ currentNotifyCount.ToString
|
||||
+ ') does not match the expected number ('
|
||||
+ totalAdvisedExpected.ToString
|
||||
+ ').'
|
||||
totalAdvisedExpected,
|
||||
currentNotifyCount,
|
||||
'The number of items in the Notifier after all Advise operations ('
|
||||
+ currentNotifyCount.ToString
|
||||
+ ') does not match the expected number ('
|
||||
+ totalAdvisedExpected.ToString
|
||||
+ ').'
|
||||
);
|
||||
|
||||
// 2. Execute UnadviseAll
|
||||
@@ -288,19 +288,19 @@ begin
|
||||
FNotifier.Lock;
|
||||
try
|
||||
FNotifier.Notify(
|
||||
function(Item: IMyTestInterface): Boolean
|
||||
begin
|
||||
Inc(currentNotifyCount);
|
||||
Result := True;
|
||||
end
|
||||
function(Item: IMyTestInterface): Boolean
|
||||
begin
|
||||
Inc(currentNotifyCount);
|
||||
Result := True;
|
||||
end
|
||||
);
|
||||
finally
|
||||
FNotifier.Release;
|
||||
end;
|
||||
Assert.AreEqual(
|
||||
0,
|
||||
currentNotifyCount,
|
||||
'The Notifier should be empty after UnadviseAll, but still contains ' + currentNotifyCount.ToString + ' items.'
|
||||
0,
|
||||
currentNotifyCount,
|
||||
'The Notifier should be empty after UnadviseAll, but still contains ' + currentNotifyCount.ToString + ' items.'
|
||||
);
|
||||
end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user