Skip to content

Commit 70c1d65

Browse files
committed
test
1 parent 1be1b29 commit 70c1d65

File tree

5 files changed

+25
-9
lines changed

5 files changed

+25
-9
lines changed

templates/csharp/tests/client/tests.mustache

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
var client = new {{client}}(new {{clientPrefix}}Config("appId", "apiKey"{{#hasRegionalHost}},"{{defaultRegion}}"{{/hasRegionalHost}}), _echo);
77
{{/autoCreateClient}}
88
{{#steps}}
9-
{{#shouldScope}} { {{/shouldScope}}
109
{{#times}}
1110
for (int i = 0; i < {{.}}; i++) {
1211
{{/times}}
@@ -16,6 +15,9 @@
1615

1716
{{/isError}}
1817
{{^isError}}
18+
{{#shouldScope}}
19+
{
20+
{{/shouldScope}}
1921
{{#dynamicTemplate}}{{/dynamicTemplate}}
2022
{{#testUserAgent}} {
2123
var regexp = new Regex({{#match}}{{> tests/generateParams}}{{/match}});
@@ -36,11 +38,13 @@
3638
JsonAssert.EqualOverrideDefault({{#match}}{{> tests/generateParams}}{{/match}}, JsonSerializer.Serialize(res, JsonConfig.Options), new JsonDiffConfig(false));
3739
{{/match.isPrimitive}}
3840
{{/testResponse}}
41+
{{#shouldScope}}
42+
}
43+
{{/shouldScope}}
3944
{{/isError}}
4045
{{#times}}
4146
}
4247
{{/times}}
43-
{{#shouldScope}} } {{/shouldScope}}
4448
{{/steps}}
4549
}
4650
{{/tests}}

templates/go/tests/client/tests.mustache

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ func Test{{#lambda.titlecase}}{{clientPrefix}}{{testType}}{{/lambda.titlecase}}{
1515
{{/autoCreateClient}}
1616
_ = echo
1717
{{#steps}}
18-
{
1918
{{#times}}
2019
for i := 0; i < {{.}}; i++ {
2120
{{/times}}
@@ -24,6 +23,9 @@ func Test{{#lambda.titlecase}}{{clientPrefix}}{{testType}}{{/lambda.titlecase}}{
2423
require.EqualError(t, err, "{{{expectedError}}}")
2524
{{/isError}}
2625
{{^isError}}
26+
{{#shouldScope}}
27+
{
28+
{{/shouldScope}}
2729
{{#dynamicTemplate}}{{/dynamicTemplate}}
2830
require.NoError(t, err)
2931
{{#testUserAgent}}
@@ -51,9 +53,11 @@ func Test{{#lambda.titlecase}}{{clientPrefix}}{{testType}}{{/lambda.titlecase}}{
5153
require.JSONEq(t, `{{{match.value}}}`, string(rawBody))
5254
{{/match.isPrimitive}}
5355
{{/testResponse}}
56+
{{#shouldScope}}
57+
}
58+
{{/shouldScope}}
5459
{{/isError}}
5560
{{#times}}
56-
}
5761
{{/times}}
5862
}
5963
{{/steps}}

templates/javascript/tests/client/tests.mustache

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ describe('{{testType}}', () => {
77
{{/autoCreateClient}}
88

99
{{#steps}}
10-
{{#shouldScope}} { {{/shouldScope}}
1110
{{#times}}
1211
for (let i = 0; i < {{.}}; i++) {
1312
{{/times}}
@@ -20,6 +19,9 @@ describe('{{testType}}', () => {
2019
}
2120
{{/isError}}
2221
{{^isError}}
22+
{{#shouldScope}}
23+
{
24+
{{/shouldScope}}
2325
{{#dynamicTemplate}}{{/dynamicTemplate}}
2426

2527
{{#testUserAgent}}
@@ -44,11 +46,13 @@ describe('{{testType}}', () => {
4446
expect(result).toEqual({{{match.value}}});
4547
{{/match.isPrimitive}}
4648
{{/testResponse}}
49+
{{#shouldScope}}
50+
}
51+
{{/shouldScope}}
4752
{{/isError}}
4853
{{#times}}
4954
}
5055
{{/times}}
51-
{{#shouldScope}} } {{/shouldScope}}
5256
{{/steps}}
5357
}, 15000);
5458

templates/php/tests/client/tests.mustache

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ public function test{{testIndex}}{{testType}}(): void
66
$client = $this->createClient(self::APP_ID, self::API_KEY);
77
{{/autoCreateClient}}
88
{{#steps}}
9-
{
109
{{#times}}
1110
for ($i = 1; $i <= {{.}}; $i++) {
1211
{{/times}}
@@ -19,6 +18,9 @@ public function test{{testIndex}}{{testType}}(): void
1918
}
2019
{{/isError}}
2120
{{^isError}}
21+
{{#shouldScope}}
22+
{
23+
{{/shouldScope}}
2224
{{#dynamicTemplate}}{{/dynamicTemplate}}
2325
{{#testUserAgent}}
2426
$this->assertTrue(
@@ -59,9 +61,11 @@ public function test{{testIndex}}{{testType}}(): void
5961
);
6062
{{/match.isPrimitive}}
6163
{{/testResponse}}
64+
{{#shouldScope}}
65+
}
66+
{{/shouldScope}}
6267
{{/isError}}
6368
{{#times}}
64-
}
6569
{{/times}}
6670
}
6771
{{/steps}}

templates/scala/tests/client/client.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class {{clientPrefix}}Test extends AnyFunSuite {
5555
{{/isError}}
5656
{{^isError}}
5757
{{#shouldScope}}
58-
{
58+
{
5959
{{/shouldScope}}
6060
{{#dynamicTemplate}}{{/dynamicTemplate}}
6161
{{#testUserAgent}}

0 commit comments

Comments
 (0)