Skip to content

Commit a07a4b6

Browse files
committed
feat: add tests EnumTests
- new tests for Node, Deno, web, swift, ruby, python, php, kotlin, dotnet, android Signed-off-by: Jay <jaykumar20march@gmail.com>
1 parent 2c37098 commit a07a4b6

File tree

27 files changed

+326
-302
lines changed

27 files changed

+326
-302
lines changed

src/SDK/Language/Android.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,11 @@ public function getFiles(): array
387387
'destination' => 'library/src/main/java/io/appwrite/models/{{ definition.name | caseUcfirst }}.kt',
388388
'template' => '/android/library/src/main/java/io/appwrite/models/Model.kt.twig',
389389
],
390+
[
391+
'scope' => 'default',
392+
'destination' => 'tests/TestException.kt',
393+
'template' => '/android/tests/TestException.kt.twig',
394+
],
390395
];
391396
}
392397
}

src/SDK/Language/Deno.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ public function getFiles(): array
9393
'destination' => 'docs/examples/{{service.name | caseLower}}/{{method.name | caseDash}}.md',
9494
'template' => 'deno/docs/example.md.twig',
9595
],
96+
[
97+
'scope' => 'default',
98+
'destination' => 'tests/test_exception.ts',
99+
'template' => 'deno/tests/test_exception.ts.twig',
100+
],
96101
];
97102
}
98103

src/SDK/Language/DotNet.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,12 @@ public function getFiles(): array
395395
'scope' => 'definition',
396396
'destination' => '/src/{{ spec.title | caseUcfirst }}/Models/{{ definition.name | caseUcfirst | overrideIdentifier }}.cs',
397397
'template' => 'dotnet/src/Appwrite/Models/Model.cs.twig',
398-
]
398+
],
399+
[
400+
'scope' => 'default',
401+
'destination' => 'tests/Test{{ spec.title | caseUcfirst }}Exception.cs',
402+
'template' => 'dotnet/tests/TestException.cs.twig',
403+
],
399404
];
400405
}
401406

src/SDK/Language/Kotlin.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,11 @@ public function getFiles(): array
419419
'destination' => '/src/main/kotlin/{{ sdk.namespace | caseSlash }}/models/{{ definition.name | caseUcfirst }}.kt',
420420
'template' => '/kotlin/src/main/kotlin/io/appwrite/models/Model.kt.twig',
421421
],
422+
[
423+
'scope' => 'default',
424+
'destination' => 'tests/TestException.kt',
425+
'template' => '/kotlin/tests/TestException.kt.twig',
426+
],
422427
];
423428
}
424429

src/SDK/Language/Node.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ public function getFiles(): array
126126
'destination' => '.travis.yml',
127127
'template' => 'node/.travis.yml.twig',
128128
],
129+
[
130+
'scope' => 'default',
131+
'destination' => '/tests/test_exception.js',
132+
'template' => 'node/tests/test_exception.js.twig',
133+
],
129134
];
130135
}
131136

src/SDK/Language/PHP.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ public function getFiles(): array
212212
'destination' => '/src/{{ spec.title | caseUcfirst}}/Services/{{service.name | caseUcfirst}}.php',
213213
'template' => 'php/src/Services/Service.php.twig',
214214
],
215+
[
216+
'scope' => 'default',
217+
'destination' => 'tests/TestException.php',
218+
'template' => 'php/tests/TestException.php.twig',
219+
],
215220
];
216221
}
217222

src/SDK/Language/Python.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public function getFiles(): array
187187
[
188188
'scope' => 'default',
189189
'destination' => 'test/{{ spec.title | caseSnake}}/test_exception.py',
190-
'template' => 'python/test/package/test_exception.py.twig',
190+
'template' => 'python/tests/package/test_exception.py.twig',
191191
],
192192
];
193193
}

src/SDK/Language/Ruby.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public function getFiles(): array
185185
[
186186
'scope' => 'default',
187187
'destination' => 'test/lib/{{ spec.title | caseDash }}/test_exception.rb',
188-
'template' => 'ruby/test/lib/appwrite/test_exception.rb.twig',
188+
'template' => 'ruby/tests/lib/appwrite/test_exception.rb.twig',
189189
],
190190
];
191191
}

src/SDK/Language/Swift.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,11 @@ public function getFiles(): array
284284
'destination' => '/Sources/{{ spec.title | caseUcfirst}}Models/{{ definition.name | caseUcfirst }}.swift',
285285
'template' => '/swift/Sources/Models/Model.swift.twig',
286286
],
287+
[
288+
'scope' => 'default',
289+
'destination' => '/Tests/{{ spec.title | caseUcfirst}}Tests/TestException.swift',
290+
'template' => 'swift/Tests/TestException.swift.twig',
291+
],
287292
];
288293
}
289294

src/SDK/Language/Web.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,16 @@ public function getFiles(): array
115115
'destination' => '.travis.yml',
116116
'template' => 'web/.travis.yml.twig',
117117
],
118+
[
119+
'scope' => 'default',
120+
'destination' => 'tests/test_exception.ts',
121+
'template' => 'web/tests/test_exception.ts.twig',
122+
],
123+
[
124+
'scope' => 'default',
125+
'destination' => 'src/exception.ts',
126+
'template' => 'web/src/exception.ts.twig',
127+
],
118128
];
119129
}
120130

0 commit comments

Comments
 (0)