Implemented TLazy + Tests
This commit is contained in:
@@ -105,7 +105,7 @@ end;
|
||||
|
||||
function TTestMycDirtyFlag.CreateAndPrepareDirtyFlag(StartDirty: Boolean = True): IMycDirty;
|
||||
begin
|
||||
Result := TState.CreateDirty; // Initially dirty
|
||||
Result := TDirty.Construct; // Initially dirty
|
||||
if not StartDirty then
|
||||
Result.Reset; // Reset to make it clean
|
||||
Assert.AreEqual(StartDirty, Result.State.IsSet, 'CreateAndPrepareDirtyFlag initial state incorrect.');
|
||||
@@ -127,7 +127,7 @@ procedure TTestMycDirtyFlag.TestCreate_InitialStateIsDirty;
|
||||
var
|
||||
dirtyFlag: IMycDirty;
|
||||
begin
|
||||
dirtyFlag := TState.CreateDirty;
|
||||
dirtyFlag := TDirty.Construct;
|
||||
Assert.IsTrue(dirtyFlag.State.IsSet, 'Newly created dirty flag should be IsSet (dirty).');
|
||||
end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user