From aadc07396d78060c112146952d96d0ef700328b9 Mon Sep 17 00:00:00 2001 From: wing328 Date: Sun, 29 Nov 2015 18:31:14 +0800 Subject: [PATCH 1/3] add better exception handling in test case --- .../generator/online/OnlineGeneratorOptionsTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/swagger-generator/src/test/java/io/swagger/generator/online/OnlineGeneratorOptionsTest.java b/modules/swagger-generator/src/test/java/io/swagger/generator/online/OnlineGeneratorOptionsTest.java index 0d2574673d..77ca898f91 100644 --- a/modules/swagger-generator/src/test/java/io/swagger/generator/online/OnlineGeneratorOptionsTest.java +++ b/modules/swagger-generator/src/test/java/io/swagger/generator/online/OnlineGeneratorOptionsTest.java @@ -109,7 +109,12 @@ public class OnlineGeneratorOptionsTest { outputFilename = Generator.generateClient(provider.getLanguage(), input); } final File dir = new File(new File(outputFilename).getParent()); - FileUtils.deleteDirectory(dir); + + try { + FileUtils.deleteDirectory(dir); + } catch (Exception e) { // directory can't be delete for some reasons + e.printStackTrace(); + } for (InvocationCounter option : options.values()) { assertNotEquals(option.getCounter(), 0, String.format("Option \"%s\" wasn't processed.", option.getValue())); From 96003a1e90afb43e6c730427ac19b34688783a7c Mon Sep 17 00:00:00 2001 From: wing328 Date: Mon, 30 Nov 2015 10:53:31 +0800 Subject: [PATCH 2/3] fix typo --- .../online/OnlineGeneratorOptionsTest.java | 2 +- .../AppIcon.appiconset/Contents.json | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/modules/swagger-generator/src/test/java/io/swagger/generator/online/OnlineGeneratorOptionsTest.java b/modules/swagger-generator/src/test/java/io/swagger/generator/online/OnlineGeneratorOptionsTest.java index 77ca898f91..8ec4d1760e 100644 --- a/modules/swagger-generator/src/test/java/io/swagger/generator/online/OnlineGeneratorOptionsTest.java +++ b/modules/swagger-generator/src/test/java/io/swagger/generator/online/OnlineGeneratorOptionsTest.java @@ -112,7 +112,7 @@ public class OnlineGeneratorOptionsTest { try { FileUtils.deleteDirectory(dir); - } catch (Exception e) { // directory can't be delete for some reasons + } catch (Exception e) { // directory can't be deleted for some reasons e.printStackTrace(); } for (InvocationCounter option : options.values()) { diff --git a/samples/client/petstore/objc/SwaggerClientTests/SwaggerClient/Images.xcassets/AppIcon.appiconset/Contents.json b/samples/client/petstore/objc/SwaggerClientTests/SwaggerClient/Images.xcassets/AppIcon.appiconset/Contents.json index f697f61f4a..36d2c80d88 100644 --- a/samples/client/petstore/objc/SwaggerClientTests/SwaggerClient/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/samples/client/petstore/objc/SwaggerClientTests/SwaggerClient/Images.xcassets/AppIcon.appiconset/Contents.json @@ -5,16 +5,31 @@ "size" : "29x29", "scale" : "2x" }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "40x40", "scale" : "2x" }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "60x60", "scale" : "2x" }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, { "idiom" : "ipad", "size" : "29x29", @@ -50,4 +65,4 @@ "version" : 1, "author" : "xcode" } -} +} \ No newline at end of file From 90c93522b3454b653d356ea564015d6d3c1290b5 Mon Sep 17 00:00:00 2001 From: wing328 Date: Mon, 30 Nov 2015 10:59:51 +0800 Subject: [PATCH 3/3] undo ios sample change --- .../AppIcon.appiconset/Contents.json | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/samples/client/petstore/objc/SwaggerClientTests/SwaggerClient/Images.xcassets/AppIcon.appiconset/Contents.json b/samples/client/petstore/objc/SwaggerClientTests/SwaggerClient/Images.xcassets/AppIcon.appiconset/Contents.json index 36d2c80d88..f697f61f4a 100644 --- a/samples/client/petstore/objc/SwaggerClientTests/SwaggerClient/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/samples/client/petstore/objc/SwaggerClientTests/SwaggerClient/Images.xcassets/AppIcon.appiconset/Contents.json @@ -5,31 +5,16 @@ "size" : "29x29", "scale" : "2x" }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, { "idiom" : "iphone", "size" : "40x40", "scale" : "2x" }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, { "idiom" : "iphone", "size" : "60x60", "scale" : "2x" }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - }, { "idiom" : "ipad", "size" : "29x29", @@ -65,4 +50,4 @@ "version" : 1, "author" : "xcode" } -} \ No newline at end of file +}