Skip to content

Commit 6523ad7

Browse files
committed
add typescript-angular test
1 parent 7766264 commit 6523ad7

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

modules/swagger-codegen/src/test/java/io/swagger/codegen/v3/service/GeneratorServiceTest.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public void testGeneratorService_readmeV3_NoOption() throws IOException {
131131
}
132132
}
133133
}
134-
134+
135135
@Test(description = "test generator service with html2")
136136
public void testGeneratorService_HTML2_Bearer() throws IOException {
137137

@@ -788,6 +788,23 @@ public void testGeneratorService_ResolvedSpec() throws IOException {
788788

789789
}
790790

791+
@Test(description = "test generator service with typescript-angular 3.0")
792+
public void testGeneratorServiceTypescriptAngular3() {
793+
794+
GenerationRequest request = new GenerationRequest();
795+
request
796+
.codegenVersion(GenerationRequest.CodegenVersion.V3)
797+
.type(GenerationRequest.Type.CLIENT)
798+
.lang("typescript-angular")
799+
.spec(loadSpecAsNode("3_0_0/petstore.json", false, false))
800+
.options(
801+
new Options()
802+
.outputDir(getTmpFolder().getAbsolutePath())
803+
);
804+
List<File> files = new GeneratorService().generationRequest(request).generate();
805+
Assert.assertFalse(files.isEmpty());
806+
}
807+
791808
protected static File getTmpFolder() {
792809
try {
793810
File outputFolder = Files.createTempFile("codegentest-", "-tmp").toFile();

0 commit comments

Comments
 (0)