forked from loafle/openapi-generator-original
add better exception handling in test case
This commit is contained in:
parent
2d34f567ff
commit
aadc07396d
@ -109,7 +109,12 @@ public class OnlineGeneratorOptionsTest {
|
|||||||
outputFilename = Generator.generateClient(provider.getLanguage(), input);
|
outputFilename = Generator.generateClient(provider.getLanguage(), input);
|
||||||
}
|
}
|
||||||
final File dir = new File(new File(outputFilename).getParent());
|
final File dir = new File(new File(outputFilename).getParent());
|
||||||
|
|
||||||
|
try {
|
||||||
FileUtils.deleteDirectory(dir);
|
FileUtils.deleteDirectory(dir);
|
||||||
|
} catch (Exception e) { // directory can't be delete for some reasons
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
for (InvocationCounter option : options.values()) {
|
for (InvocationCounter option : options.values()) {
|
||||||
assertNotEquals(option.getCounter(), 0, String.format("Option \"%s\" wasn't processed.",
|
assertNotEquals(option.getCounter(), 0, String.format("Option \"%s\" wasn't processed.",
|
||||||
option.getValue()));
|
option.getValue()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user