Update of /cvsroot/instantobjects/Source/Tests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19668
Modified Files:
TestMockBroker.pas
Log Message:
Added Phones parts to TContact test
Index: TestMockBroker.pas
===================================================================
RCS file: /cvsroot/instantobjects/Source/Tests/TestMockBroker.pas,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TestMockBroker.pas 22 Feb 2005 16:47:48 -0000 1.3
--- TestMockBroker.pas 22 Feb 2005 16:56:49 -0000 1.4
***************
*** 101,104 ****
--- 101,105 ----
old_id: string;
brok: TInstantMockBroker;
+ t: TPhone;
begin
InstantModel.LoadFromFile(ChangeFileExt(ParamStr(0),'.mdx'));
***************
*** 110,113 ****
--- 111,123 ----
c.Name := 'Mike';
c.Address.City := 'Milan';
+ t := TPhone.Create;
+ t.Name := 'Home';
+ t.Number := '012 12345678';
+ c.AddPhone(t);
+ t := TPhone.Create;
+ t.Name := 'Office';
+ t.Number := '012 23456781';
+ c.AddPhone(t);
+ AssertEquals(2, c.PhoneCount);
c.Store();
old_id := c.id;
***************
*** 124,127 ****
--- 134,138 ----
AssertEquals(old_id, c.Id);
AssertNotNull(c.Address);
+ AssertEquals(0, c.PhoneCount); //mock brocker cannot collect part and parts
finally
c.Free;
***************
*** 147,149 ****
RegisterTests([TTestMockBroker]);
! end.
\ No newline at end of file
--- 158,160 ----
RegisterTests([TTestMockBroker]);
! end.
\ No newline at end of file
|