New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write svg in json tests for debug #187
Conversation
1f33ac7
to
8d33028
Compare
@@ -61,7 +61,7 @@ public void test() { | |||
new BlockOrganizer().organize(g); | |||
|
|||
// calculate coordinates | |||
LayoutParameters layoutParameters = new LayoutParameters() | |||
layoutParameters = new LayoutParameters() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not very important but it is probably a little bit weak as a design. Maybe just have an abstract LayoutParameters getLayoutParameter()
in the base class?
Used for debug purposes, checking the look of the corresponding SVG Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
- Replacing all new LayoutParameters in tests by getLayoutParameters - Factorizing same LayoutParameters with createDefaultLayoutParameters() Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
0e59963
to
1ed1deb
Compare
In order to generate all svg files even if one test fails Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
1ed1deb
to
0ffc22b
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information The version of Java (1.8.0_275) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 11. |
Please check if the PR fulfills these requirements (please use
'[x]'
to check the checkboxes, or submit the PR and then click the checkboxes)Does this PR already have an issue describing the problem ?
No.
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature
What is the current behavior? (You can also link to an open issue here)
One cannot easily generate all svg files related to json reference test files (which sometimes correspond to not-so-good diagrams) to see whether the reference is ok, and when changing the reference file whether that change is not unexpectedly changing the diagram rendering.
What is the new behavior (if this is a feature change)?
If writeFile parameter is true in AbstractTestCase, all json tests inheriting from
AbstractTestCase
will generate the corresponding svg file.Does this PR introduce a breaking change or deprecate an API?
No
Other information:
Note that this had already been done by @BenoitJeanson for tests extending
AbstractTestCaseRaw
, this PR simply extends this behaviour to all tests extendingAbstractTestCase