Skip to content

Commit 89514d2

Browse files
committed
fix dart tests
1 parent f580938 commit 89514d2

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

tests/languages/dart/tests.dart

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import '../lib/packageName.dart';
2+
import '../lib/models.dart';
23

34
void main() async {
45
Client client = Client();
@@ -12,49 +13,49 @@ void main() async {
1213
print('\nTest Started');
1314

1415
// Foo Tests
15-
Response response;
16+
Mock response;
1617
response = await foo.get(x: 'string', y: 123, z: ['string in array']);
17-
print(response.data['result']);
18+
print(response.result);
1819

1920
response = await foo.post(x: 'string', y: 123, z: ['string in array']);
20-
print(response.data['result']);
21+
print(response.result);
2122

2223
response = await foo.put(x: 'string', y: 123, z: ['string in array']);
23-
print(response.data['result']);
24+
print(response.result);
2425

2526
response = await foo.patch(x: 'string', y: 123, z: ['string in array']);
26-
print(response.data['result']);
27+
print(response.result);
2728

2829
response = await foo.delete(x: 'string', y: 123, z: ['string in array']);
29-
print(response.data['result']);
30+
print(response.result);
3031

3132
// Bar Tests
3233

3334
response = await bar.get(xrequired: 'string', xdefault: 123, z: ['string in array']);
34-
print(response.data['result']);
35+
print(response.result);
3536

3637
response = await bar.post(xrequired: 'string', xdefault: 123, z: ['string in array']);
37-
print(response.data['result']);
38+
print(response.result);
3839

3940
response = await bar.put(xrequired: 'string', xdefault: 123, z: ['string in array']);
40-
print(response.data['result']);
41+
print(response.result);
4142

4243
response = await bar.patch(xrequired: 'string', xdefault: 123, z: ['string in array']);
43-
print(response.data['result']);
44+
print(response.result);
4445

4546
response = await bar.delete(xrequired: 'string', xdefault: 123, z: ['string in array']);
46-
print(response.data['result']);
47+
print(response.result);
4748

4849
// General Tests
4950

5051
response = await general.redirect();
51-
print(response.data['result']);
52+
print(response['result']);
5253

5354
final file = await MultipartFile.fromPath('file', '../../resources/file.png',
5455
filename: 'file.png');
5556
response = await general.upload(
5657
x: 'string', y: 123, z: ['string in array'], file: file);
57-
print(response.data['result']);
58+
print(response.result);
5859

5960
try {
6061
await general.error400();
@@ -75,8 +76,8 @@ void main() async {
7576
}
7677

7778
// response = await general.setCookie();
78-
// print(response.data['result']);
79+
// print(response.result);
7980

8081
// response = await general.getCookie();
81-
// print(response.data['result']);
82+
// print(response.result);
8283
}

0 commit comments

Comments
 (0)