forked from loafle/openapi-generator-original
Merge pull request #1633 from wing328/fix_window_test_case
Add exception handling in the test case (for Windows)
This commit is contained in:
commit
d7460dac32
@ -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());
|
||||||
FileUtils.deleteDirectory(dir);
|
|
||||||
|
try {
|
||||||
|
FileUtils.deleteDirectory(dir);
|
||||||
|
} catch (Exception e) { // directory can't be deleted 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