mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 15:55:54 +01:00
Testing adjustments to work with the new RESTClient
This commit is contained in:
parent
181cf5aba9
commit
972237a17a
@ -4,7 +4,7 @@
|
||||
<ProjectVersion>19.1</ProjectVersion>
|
||||
<FrameworkType>VCL</FrameworkType>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">CI</Config>
|
||||
<Config Condition="'$(Config)'==''">GUI</Config>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
<TargetedPlatforms>1</TargetedPlatforms>
|
||||
<AppType>Console</AppType>
|
||||
|
@ -933,7 +933,7 @@ end;
|
||||
|
||||
procedure TServerTest.TestEntityWithArrays;
|
||||
var
|
||||
lRes: IRESTResponse;
|
||||
lRes: IMVCRESTResponse;
|
||||
lObj1, lObj2: TEntityWithArray;
|
||||
lBody: String;
|
||||
begin
|
||||
@ -944,10 +944,10 @@ begin
|
||||
lObj1.Booleans := [true, false];
|
||||
lBody := GetDefaultSerializer.SerializeObject(lObj1);
|
||||
|
||||
lRes := RESTClient.doPOST('/entitywitharrays', [], lBody);
|
||||
lRes := RESTClient.Post('/entitywitharrays', lBody);
|
||||
lObj2 := TEntityWithArray.Create;
|
||||
try
|
||||
GetDefaultSerializer.DeserializeObject(lRes.BodyAsString, lObj2);
|
||||
GetDefaultSerializer.DeserializeObject(lRes.Content, lObj2);
|
||||
|
||||
Assert.AreEqual(4, Length(lObj2.Names));
|
||||
Assert.AreEqual(lObj1.Names[0], lObj2.Names[0]);
|
||||
@ -975,7 +975,7 @@ end;
|
||||
|
||||
procedure TServerTest.TestEntityWithEmptyArrays;
|
||||
var
|
||||
lRes: IRESTResponse;
|
||||
lRes: IMVCRESTResponse;
|
||||
lObj1, lObj2: TEntityWithArray;
|
||||
lBody: String;
|
||||
begin
|
||||
@ -983,10 +983,10 @@ begin
|
||||
try
|
||||
lBody := GetDefaultSerializer.SerializeObject(lObj1);
|
||||
|
||||
lRes := RESTClient.doPOST('/entitywitharrays', [], lBody);
|
||||
lRes := RESTClient.Post('/entitywitharrays', lBody);
|
||||
lObj2 := TEntityWithArray.Create;
|
||||
try
|
||||
GetDefaultSerializer.DeserializeObject(lRes.BodyAsString, lObj2);
|
||||
GetDefaultSerializer.DeserializeObject(lRes.Content, lObj2);
|
||||
|
||||
Assert.AreEqual(1, Length(lObj2.Names));
|
||||
Assert.AreEqual('added', lObj2.Names[0]);
|
||||
|
Loading…
Reference in New Issue
Block a user