-
Notifications
You must be signed in to change notification settings - Fork 210
Open
Description
I have a test defined like so:
[Test]
[TestCase('TestSetAsInteger 001.', '0')]
[TestCase('TestSetAsInteger 002.', '666')]
procedure TestSetAsInteger(IntVal : integer);
And Implemented like so:
procedure TTestKeyValueList.TestSetAsInteger(IntVal: integer);
begin
FKVL.AsInteger['testkey'] := IntVal;
Assert.AreEqual(IntVal, FKVL.AsInteger['testkey']);
end;
The methods in FKVL are stubs, so they should fail. Problem is, they always pass.
Now, If I change the test implementation to:
procedure TTestKeyValueList.TestSetAsInteger(IntVal: integer);
begin
FKVL.AsInteger['testkey'] := IntVal;
Sleep(1); //This can be anything really, I can call FKVL.Count or other some such
Assert.AreEqual(IntVal, FKVL.AsInteger['testkey']);
end;
The test now works as intended. Weird.
Metadata
Metadata
Assignees
Labels
No labels