Skip to content

Commit 860caff

Browse files
committed
Fix test cases in the generator
1 parent c07767f commit 860caff

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

generator/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
target/
22
.vscode/
3+
/out/

generator/src/test/java/line/bot/generator/LineBotSdkNodejsGeneratorGeneratorTest.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,26 @@
1919
*/
2020
public class LineBotSdkNodejsGeneratorGeneratorTest {
2121

22-
// use this test to launch you code generator in the debugger.
23-
// this allows you to easily set break points in MyclientcodegenGenerator.
24-
@Test
25-
public void launchCodeGenerator() {
26-
// to understand how the 'openapi-generator-cli' module is using 'CodegenConfigurator', have a look at the 'Generate' class:
27-
// https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java
28-
final CodegenConfigurator configurator = new CodegenConfigurator()
29-
.setGeneratorName("line-bot-sdk-nodejs-generator") // use this codegen library
30-
.setInputSpec("../../../modules/openapi-generator/src/test/resources/2_0/petstore.yaml") // sample OpenAPI file
31-
// .setInputSpec("https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml") // or from the server
32-
.setOutputDir("out/line-bot-sdk-nodejs-generator"); // output directory
22+
// use this test to launch you code generator in the debugger.
23+
// this allows you to easily set break points in MyclientcodegenGenerator.
24+
@Test
25+
public void launchCodeGenerator() {
26+
// to understand how the 'openapi-generator-cli' module is using 'CodegenConfigurator', have a look at the 'Generate' class:
27+
// https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java
28+
final CodegenConfigurator configurator = new CodegenConfigurator()
29+
.setGeneratorName("line-bot-sdk-nodejs-generator") // use this codegen library
30+
.setInputSpec("../line-openapi/shop.yml") // sample OpenAPI file
31+
// .setInputSpec("https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml") // or from the server
32+
.setOutputDir("out/line-bot-sdk-nodejs-generator"); // output directory
3333

34-
final ClientOptInput clientOptInput = configurator.toClientOptInput();
35-
DefaultGenerator generator = new DefaultGenerator();
36-
generator.opts(clientOptInput).generate();
37-
}
34+
final ClientOptInput clientOptInput = configurator.toClientOptInput();
35+
DefaultGenerator generator = new DefaultGenerator();
36+
generator.opts(clientOptInput).generate();
37+
}
3838

3939
@Test
4040
public void pathReplacer() {
41-
String s = LineBotSdkNodejsGeneratorGenerator.pathReplacer("/foo/{bar}/baz/{boz}");
42-
assertEquals(".replace(\"{bar}\", String(bar)).replace(\"{boz}\", String(boz))", s);
41+
String s = LineBotSdkNodejsGeneratorGenerator.pathReplacer("/foo/{bar}/baz/{boz}");
42+
assertEquals(".replace(\"{bar}\", String(bar)).replace(\"{boz}\", String(boz))", s);
4343
}
4444
}

0 commit comments

Comments
 (0)