Skip to content

Commit 4419094

Browse files
Merge pull request #108 from rpottsoh/patch-1
Not enough Params being passed
2 parents c468846 + aacabbf commit 4419094

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Tests/Delphi.Mocks.Tests.ObjectProxy.pas

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ procedure TTestObjectProxy.ProxyObject_Calls_The_Create_Of_The_Object_Type;
7979
var
8080
objectProxy: IProxy<TSimpleObject>;
8181
begin
82-
objectProxy := TObjectProxy<TSimpleObject>.Create;
82+
objectProxy := TObjectProxy<TSimpleObject>.Create(function: TSimpleObject
83+
begin
84+
result := TSimpleObject.Create;
85+
end);
8386

8487
Assert.AreEqual(objectProxy.Proxy.CreateCalled, G_CREATE_CALLED_UNIQUE_ID);
8588
end;
@@ -88,7 +91,10 @@ procedure TTestObjectProxy.ProxyObject_MultipleConstructor;
8891
var
8992
objectProxy: IProxy<TMultipleConstructor>;
9093
begin
91-
objectProxy := TObjectProxy<TMultipleConstructor>.Create;
94+
objectProxy := TObjectProxy<TMultipleConstructor>.Create(function: TMultipleConstructor
95+
begin
96+
result := TMultipleConstructor.Create;
97+
end);
9298

9399
Assert.AreEqual(objectProxy.Proxy.CreateCalled, G_CREATE_CALLED_UNIQUE_ID);
94100
end;

0 commit comments

Comments
 (0)