-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix breaking changes in Render contract (#742)
* Fix breaking changes in Render contract * Fix code review issue, update readme, add test, group render tests within one folder. * Fix formatting
- Loading branch information
Showing
8 changed files
with
86 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 33 additions & 1 deletion
34
core/src/main/java/org/openapitools/openapidiff/core/output/Render.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../openapidiff/core/AsciidocRenderTest.java → ...idiff/core/output/AsciidocRenderTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...s/openapidiff/core/ConsoleRenderTest.java → ...pidiff/core/output/ConsoleRenderTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ools/openapidiff/core/HtmlRenderTest.java → ...enapidiff/core/output/HtmlRenderTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ools/openapidiff/core/JsonRenderTest.java → ...enapidiff/core/output/JsonRenderTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../openapidiff/core/MarkdownRenderTest.java → ...idiff/core/output/MarkdownRenderTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
core/src/test/java/org/openapitools/openapidiff/core/output/RenderTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.openapitools.openapidiff.core.output; | ||
|
||
import static org.assertj.core.api.AssertionsForClassTypes.assertThat; | ||
|
||
import java.io.IOException; | ||
import org.junit.jupiter.api.Test; | ||
import org.openapitools.openapidiff.core.exception.RendererException; | ||
import org.openapitools.openapidiff.core.model.ChangedOpenApi; | ||
|
||
class RenderTest { | ||
|
||
private final Render testRenderImpl = | ||
(diff, outputStreamWriter) -> { | ||
try { | ||
outputStreamWriter.write("Output"); | ||
outputStreamWriter.close(); | ||
} catch (IOException e) { | ||
throw new RendererException(e); | ||
} | ||
}; | ||
|
||
@Test | ||
void testDefaultRenderMethod() { | ||
ChangedOpenApi diff = new ChangedOpenApi(null); | ||
assertThat(testRenderImpl.render(diff)).isEqualTo("Output"); | ||
} | ||
} |