forked from loafle/openapi-generator-original
clearing -Dapis correctly. Travis, it's the last time, I sweargit add src/test/java/io/swagger/codegen/statichtml/StaticHtmlTagsTest.java
This commit is contained in:
parent
d84b565069
commit
f3a3a0211b
@ -1,6 +1,5 @@
|
||||
package io.swagger.codegen;
|
||||
|
||||
import io.swagger.codegen.config.CodegenConfigurator;
|
||||
import io.swagger.codegen.languages.JavaClientCodegen;
|
||||
import io.swagger.models.Swagger;
|
||||
import io.swagger.parser.SwaggerParser;
|
||||
@ -165,22 +164,13 @@ public class DefaultGeneratorTest {
|
||||
final Swagger swagger = new SwaggerParser().read("src/test/resources/petstore.json");
|
||||
CodegenConfig codegenConfig = new JavaClientCodegen();
|
||||
codegenConfig.setOutputDir(output.getAbsolutePath());
|
||||
{
|
||||
new CodegenConfigurator().setVerbose(true).toClientOptInput();
|
||||
}
|
||||
|
||||
ClientOptInput clientOptInput = new ClientOptInput().opts(new ClientOpts()).swagger(swagger).config(codegenConfig);
|
||||
|
||||
final File order = new File(output, MODEL_ORDER_FILE);
|
||||
System.out.println(""+order.getAbsolutePath()+" exists:"+order.exists());
|
||||
//generate content first time without skipOverwrite flag, so all generated files should be recorded
|
||||
new DefaultGenerator().opts(clientOptInput).generate();
|
||||
{
|
||||
new CodegenConfigurator().setVerbose(true).toClientOptInput();
|
||||
}
|
||||
|
||||
|
||||
assertTrue(order.exists(),"can't find: "+order.getAbsolutePath()+" output dir is:"+ (output.getAbsolutePath())+" it exists:"+output.exists() );
|
||||
final File order = new File(output, MODEL_ORDER_FILE);
|
||||
assertTrue(order.exists());
|
||||
|
||||
//change content of one file
|
||||
changeContent(order);
|
||||
|
@ -84,6 +84,8 @@ public class StaticHtmlTagsTest {
|
||||
} finally {
|
||||
if (apisBackup!=null) {
|
||||
System.setProperty("apis", apisBackup);
|
||||
}else{
|
||||
System.clearProperty("apis");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user