Skip to content

Commit

Permalink
Fix #2340 (#2387)
Browse files Browse the repository at this point in the history
Test case was using an invalid mixture of File.getAbsoluteFile|Path()
and File.getCanonicalFile|Path() to identify generated output files.
  • Loading branch information
demonfiddler authored and wing328 committed Mar 18, 2019
1 parent d18bf04 commit 9bb94fe
Showing 1 changed file with 7 additions and 7 deletions.
Expand Up @@ -558,7 +558,7 @@ public void testAdditionalPropertiesPutForConfigValues() throws Exception {

@Test
public void testAddOperationToGroup() throws Exception {
File output = Files.createTempDirectory("test").toFile();
File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
output.deleteOnExit();

OpenAPI openAPI = new OpenAPIParser().readLocation("src/test/resources/3_0/tags.yaml", null, new ParseOptions())
Expand Down Expand Up @@ -634,11 +634,11 @@ public void testAddOperationToGroup() throws Exception {
assertEquals(group5List.get(1).subresourceOperation, true);
}

@Test(enabled = false)
@Test()
public void testGenerateOperationBodyWithCodedTestData() throws Exception {
File output = Files.createTempDirectory("test").toFile();
File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
output.deleteOnExit();
String outputPath = output.getCanonicalPath().replace('\\', '/');
String outputPath = output.getAbsolutePath().replace('\\', '/');

OpenAPI openAPI = new OpenAPIParser()
.readLocation("src/test/resources/3_0/petstore.yaml", null, new ParseOptions()).getOpenAPI();
Expand Down Expand Up @@ -680,11 +680,11 @@ public void testGenerateOperationBodyWithCodedTestData() throws Exception {
checkFile(generator, outputPath + "/test-data-control.json", false);
}

@Test(enabled = false)
@Test()
public void testGenerateOperationBodyWithJsonTestData() throws Exception {
File output = Files.createTempDirectory("test").toFile();
File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
output.deleteOnExit();
String outputPath = output.getCanonicalPath().replace('\\', '/');
String outputPath = output.getAbsolutePath().replace('\\', '/');

OpenAPI openAPI = new OpenAPIParser()
.readLocation("src/test/resources/3_0/petstore.yaml", null, new ParseOptions()).getOpenAPI();
Expand Down

0 comments on commit 9bb94fe

Please sign in to comment.