Skip to content

Commit 58b0b2c

Browse files
committed
update the tests without service params
1 parent cfc5f7b commit 58b0b2c

File tree

12 files changed

+72
-72
lines changed

12 files changed

+72
-72
lines changed

tests/languages/android/Tests.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class ServiceTest {
6060
.setProject("console")
6161
.addHeader("Origin", "http://localhost")
6262
.setSelfSigned(true)
63-
val foo = Foo(client, "string")
63+
val foo = Foo(client)
6464
val bar = Bar(client)
6565
val general = General(client)
6666
val realtime = Realtime(client)
@@ -73,15 +73,15 @@ class ServiceTest {
7373
runBlocking {
7474
var mock: Mock
7575
// Foo Tests
76-
mock = foo.get(123, listOf("string in array"))
76+
mock = foo.get("string", 123, listOf("string in array"))
7777
writeToFile(mock.result)
78-
mock = foo.post(123, listOf("string in array"))
78+
mock = foo.post("string", 123, listOf("string in array"))
7979
writeToFile(mock.result)
80-
mock = foo.put(123, listOf("string in array"))
80+
mock = foo.put("string", 123, listOf("string in array"))
8181
writeToFile(mock.result)
82-
mock = foo.patch(123, listOf("string in array"))
82+
mock = foo.patch("string", 123, listOf("string in array"))
8383
writeToFile(mock.result)
84-
mock = foo.delete(123, listOf("string in array"))
84+
mock = foo.delete("string", 123, listOf("string in array"))
8585
writeToFile(mock.result)
8686

8787
// Bar Tests

tests/languages/dart/tests.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import '../lib/models.dart';
33

44
void main() async {
55
Client client = Client();
6-
Foo foo = Foo(client, x: 'string');
6+
Foo foo = Foo(client);
77
Bar bar = Bar(client);
88
General general = General(client);
99

@@ -14,19 +14,19 @@ void main() async {
1414

1515
// Foo Tests
1616
Mock response;
17-
response = await foo.get(y: 123, z: ['string in array']);
17+
response = await foo.get(x: 'string', y: 123, z: ['string in array']);
1818
print(response.result);
1919

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

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

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

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

3232
// Bar Tests

tests/languages/deno/tests.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ async function start() {
88
// Init SDK
99
let client = new appwrite.Client()
1010

11-
let foo = new appwrite.Foo(client, 'string')
11+
let foo = new appwrite.Foo(client)
1212
let bar = new appwrite.Bar(client)
1313
let general = new appwrite.General(client)
1414

@@ -18,23 +18,23 @@ async function start() {
1818

1919
// Foo
2020

21-
response = await foo.get(123, ['string in array'])
21+
response = await foo.get('string', 123, ['string in array'])
2222
// @ts-ignore
2323
console.log(response.result)
2424

25-
response = await foo.post(123, ['string in array'])
25+
response = await foo.post('string', 123, ['string in array'])
2626
// @ts-ignore
2727
console.log(response.result)
2828

29-
response = await foo.put(123, ['string in array'])
29+
response = await foo.put('string', 123, ['string in array'])
3030
// @ts-ignore
3131
console.log(response.result)
3232

33-
response = await foo.patch(123, ['string in array'])
33+
response = await foo.patch('string', 123, ['string in array'])
3434
// @ts-ignore
3535
console.log(response.result)
3636

37-
response = await foo.delete(123, ['string in array'])
37+
response = await foo.delete('string', 123, ['string in array'])
3838
// @ts-ignore
3939
console.log(response.result)
4040

tests/languages/flutter/tests.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import '../lib/models.dart';
55
void main() async {
66
WidgetsFlutterBinding.ensureInitialized();
77
Client client = Client();
8-
Foo foo = Foo(client, x: 'string');
8+
Foo foo = Foo(client);
99
Bar bar = Bar(client);
1010
General general = General(client);
1111

@@ -23,19 +23,19 @@ void main() async {
2323
print('\nTest Started');
2424

2525
Mock response;
26-
response = await foo.get(y: 123, z: ['string in array']);
26+
response = await foo.get(x: 'string', y: 123, z: ['string in array']);
2727
print(response.result);
2828

29-
response = await foo.post(y: 123, z: ['string in array']);
29+
response = await foo.post(x: 'string', y: 123, z: ['string in array']);
3030
print(response.result);
3131

32-
response = await foo.put(y: 123, z: ['string in array']);
32+
response = await foo.put(x: 'string', y: 123, z: ['string in array']);
3333
print(response.result);
3434

35-
response = await foo.patch(y: 123, z: ['string in array']);
35+
response = await foo.patch(x: 'string', y: 123, z: ['string in array']);
3636
print(response.result);
3737

38-
response = await foo.delete(y: 123, z: ['string in array']);
38+
response = await foo.delete(x: 'string', y: 123, z: ['string in array']);
3939
print(response.result);
4040

4141
// Bar Tests

tests/languages/kotlin/Tests.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,22 @@ class ServiceTest {
3535
val client = Client()
3636
.addHeader("Origin", "http://localhost")
3737
.setSelfSigned(true)
38-
val foo = Foo(client, "string")
38+
val foo = Foo(client)
3939
val bar = Bar(client)
4040
val general = General(client)
4141

4242
runBlocking {
4343
var mock: Mock
4444
// Foo Tests
45-
mock = foo.get(123, listOf("string in array"))
45+
mock = foo.get("string", 123, listOf("string in array"))
4646
writeToFile(mock.result)
47-
mock = foo.post(123, listOf("string in array"))
47+
mock = foo.post("string", 123, listOf("string in array"))
4848
writeToFile(mock.result)
49-
mock = foo.put(123, listOf("string in array"))
49+
mock = foo.put("string", 123, listOf("string in array"))
5050
writeToFile(mock.result)
51-
mock = foo.patch(123, listOf("string in array"))
51+
mock = foo.patch("string", 123, listOf("string in array"))
5252
writeToFile(mock.result)
53-
mock = foo.delete(123, listOf("string in array"))
53+
mock = foo.delete("string", 123, listOf("string in array"))
5454
writeToFile(mock.result)
5555

5656
// Bar Tests

tests/languages/node/test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ async function start() {
99
// Init SDK
1010
let client = new appwrite.Client();
1111

12-
let foo = new appwrite.Foo(client, 'string');
12+
let foo = new appwrite.Foo(client);
1313
let bar = new appwrite.Bar(client);
1414
let general = new appwrite.General(client);
1515

@@ -19,19 +19,19 @@ async function start() {
1919

2020
// Foo
2121

22-
response = await foo.get(123, ['string in array']);
22+
response = await foo.get('string', 123, ['string in array']);
2323
console.log(response.result);
2424

25-
response = await foo.post(123, ['string in array']);
25+
response = await foo.post('string', 123, ['string in array']);
2626
console.log(response.result);
2727

28-
response = await foo.put(123, ['string in array']);
28+
response = await foo.put('string', 123, ['string in array']);
2929
console.log(response.result);
3030

31-
response = await foo.patch(123, ['string in array']);
31+
response = await foo.patch('string', 123, ['string in array']);
3232
console.log(response.result);
3333

34-
response = await foo.delete(123, ['string in array']);
34+
response = await foo.delete('string', 123, ['string in array']);
3535
console.log(response.result);
3636

3737
// Bar

tests/languages/php/test.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Appwrite\Services\General;
1717

1818
$client = new Client();
19-
$foo = new Foo($client, 'string');
19+
$foo = new Foo($client);
2020
$bar = new Bar($client);
2121
$general = new General($client);
2222

@@ -26,19 +26,19 @@
2626

2727
// Foo Service
2828

29-
$response = $foo->get(123, ['string in array']);
29+
$response = $foo->get('string', 123, ['string in array']);
3030
echo "{$response['result']}\n";
3131

32-
$response = $foo->post(123, ['string in array']);
32+
$response = $foo->post('string', 123, ['string in array']);
3333
echo "{$response['result']}\n";
3434

35-
$response = $foo->put(123, ['string in array']);
35+
$response = $foo->put('string', 123, ['string in array']);
3636
echo "{$response['result']}\n";
3737

38-
$response = $foo->patch(123, ['string in array']);
38+
$response = $foo->patch('string', 123, ['string in array']);
3939
echo "{$response['result']}\n";
4040

41-
$response = $foo->delete(123, ['string in array']);
41+
$response = $foo->delete('string', 123, ['string in array']);
4242
echo "{$response['result']}\n";
4343

4444
// Bar Service

tests/languages/python/tests.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
client = Client()
11-
foo = Foo(client, 'string')
11+
foo = Foo(client)
1212
bar = Bar(client)
1313
general = General(client)
1414

@@ -19,19 +19,19 @@
1919

2020
# Foo Tests
2121

22-
response = foo.get(123, ['string in array'])
22+
response = foo.get('string', 123, ['string in array'])
2323
print(response['result'])
2424

25-
response = foo.post( 123, ['string in array'])
25+
response = foo.post('string', 123, ['string in array'])
2626
print(response['result'])
2727

28-
response = foo.put( 123, ['string in array'])
28+
response = foo.put('string', 123, ['string in array'])
2929
print(response['result'])
3030

31-
response = foo.patch( 123, ['string in array'])
31+
response = foo.patch('string', 123, ['string in array'])
3232
print(response['result'])
3333

34-
response = foo.delete( 123, ['string in array'])
34+
response = foo.delete('string', 123, ['string in array'])
3535
print(response['result'])
3636

3737
# Bar Tests

tests/languages/ruby/tests.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
client = Appwrite::Client.new
44
client.add_header('Origin', 'http://localhost')
55

6-
foo = Appwrite::Foo.new(client, x: 'string')
6+
foo = Appwrite::Foo.new(client)
77
bar = Appwrite::Bar.new(client)
88
general = Appwrite::General.new(client)
99

@@ -12,19 +12,19 @@
1212

1313
# Foo
1414

15-
response = foo.get(y: 123, z: ['string in array'])
15+
response = foo.get(x: 'string', y: 123, z: ['string in array'])
1616
puts response.result
1717

18-
response = foo.post(y: 123, z: ['string in array'])
18+
response = foo.post(x: 'string', y: 123, z: ['string in array'])
1919
puts response.result
2020

21-
response = foo.put(y: 123, z: ['string in array'])
21+
response = foo.put(x: 'string', y: 123, z: ['string in array'])
2222
puts response.result
2323

24-
response = foo.patch(y: 123, z: ['string in array'])
24+
response = foo.patch(x: 'string', y: 123, z: ['string in array'])
2525
puts response.result
2626

27-
response = foo.delete(y: 123, z: ['string in array'])
27+
response = foo.delete(x: 'string', y: 123, z: ['string in array'])
2828
puts response.result
2929

3030
# Bar

tests/languages/swift-client/Tests.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Tests: XCTestCase {
2525
.addHeader(key: "Origin", value: "http://localhost")
2626
.setSelfSigned()
2727

28-
let foo = Foo(client, "string")
28+
let foo = Foo(client)
2929
let bar = Bar(client)
3030
let general = General(client)
3131
let realtime = Realtime(client)
@@ -41,19 +41,19 @@ class Tests: XCTestCase {
4141
var mock: Mock
4242

4343
// Foo Tests
44-
mock = try await foo.get(y: 123, z: ["string in array"])
44+
mock = try await foo.get(x: "string", y: 123, z: ["string in array"])
4545
print(mock.result)
4646

47-
mock = try await foo.post(y: 123, z: ["string in array"])
47+
mock = try await foo.post(x: "string", y: 123, z: ["string in array"])
4848
print(mock.result)
4949

50-
mock = try await foo.put(y: 123, z: ["string in array"])
50+
mock = try await foo.put(x: "string", y: 123, z: ["string in array"])
5151
print(mock.result)
5252

53-
mock = try await foo.patch(y: 123, z: ["string in array"])
53+
mock = try await foo.patch(x: "string", y: 123, z: ["string in array"])
5454
print(mock.result)
5555

56-
mock = try await foo.delete(y: 123, z: ["string in array"])
56+
mock = try await foo.delete(x: "string", y: 123, z: ["string in array"])
5757
print(mock.result)
5858

5959

0 commit comments

Comments
 (0)