-
Notifications
You must be signed in to change notification settings - Fork 218
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
KOGITO-4343: Fix JSONIX model generation with gwt 2.9 #3582
Conversation
@treblereel What is the difference with this PR? #3570 |
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.
@treblereel LGTM, thank you! Just a minor question.
@@ -125,7 +125,7 @@ public void checkAttachDomElement() { | |||
domElementOnDisplay); | |||
} | |||
|
|||
@Test | |||
//@Test |
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.
@treblereel Why is this test ignored?
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.
Thank you, @treblereel. The PR looks great! 🚀 Can we uncomment the test that @yesamer mentioned? :-)
wrong branch has been pushed ... let me fix it |
Kudos, SonarCloud Quality Gate passed! |
java.io.IOException: No space left on device :( |
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.
Thank you, @treblereel :-)
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.
@Test | ||
public void testConnect() { | ||
final DMNMarshaller dmnMarshaller = new DMNMarshaller(); | ||
final JSIDMNDiagram diagram = mock(JSIDMNDiagram.class); | ||
final List<String> dmnDiagramElementIds = mock(List.class); | ||
final Definitions definitionsStunnerPojo = mock(Definitions.class); | ||
final List<JSIDMNEdge> dmnEdges = new ArrayList<>(); | ||
|
||
final Node<?, ?> node = mock(Node.class); | ||
final List inEdges = new ArrayList<>(); | ||
final Edge edge = mock(Edge.class); | ||
final Node sourceNode = mock(Node.class); | ||
final View sourceView = mock(View.class); | ||
final ViewConnector viewConnector = mock(ViewConnector.class); | ||
final DiscreteConnection sourceConnection = mock(DiscreteConnection.class); | ||
final DiscreteConnection targetConnection = mock(DiscreteConnection.class); | ||
final View<?> view = mock(View.class); | ||
|
||
inEdges.add(edge); | ||
when(edge.getSourceNode()).thenReturn(sourceNode); | ||
when(sourceNode.getContent()).thenReturn(sourceView); | ||
|
||
when(node.getInEdges()).thenReturn(inEdges); | ||
when(edge.getContent()).thenReturn(viewConnector); | ||
when(viewConnector.getControlPoints()).thenReturn(new ControlPoint[]{}); | ||
when(sourceConnection.isAuto()).thenReturn(true); | ||
when(targetConnection.isAuto()).thenReturn(true); | ||
when(diagram.getName()).thenReturn("dmnEdge"); | ||
when(definitionsStunnerPojo.getDefaultNamespace()).thenReturn("org.edge"); | ||
|
||
when(viewConnector.getSourceConnection()).thenReturn(Optional.of(sourceConnection)); | ||
when(viewConnector.getTargetConnection()).thenReturn(Optional.of(targetConnection)); | ||
dmnMarshaller.connect(diagram, | ||
dmnDiagramElementIds, | ||
definitionsStunnerPojo, | ||
dmnEdges, | ||
node, | ||
view); | ||
|
||
when(viewConnector.getSourceConnection()).thenReturn(Optional.empty()); | ||
when(viewConnector.getTargetConnection()).thenReturn(Optional.empty()); | ||
dmnMarshaller.connect(diagram, | ||
dmnDiagramElementIds, | ||
definitionsStunnerPojo, | ||
dmnEdges, | ||
node, | ||
view); | ||
|
||
when(viewConnector.getSourceConnection()).thenReturn(Optional.of(sourceConnection)); | ||
when(viewConnector.getTargetConnection()).thenReturn(Optional.empty()); | ||
dmnMarshaller.connect(diagram, | ||
dmnDiagramElementIds, | ||
definitionsStunnerPojo, | ||
dmnEdges, | ||
node, | ||
view); | ||
|
||
verify(sourceConnection).isAuto(); | ||
verify(targetConnection).isAuto(); | ||
} |
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.
Why we need to remove this test please?
No resources to review this anymore. Please proceed without my further review. |
@karreiro @treblereel I think this can close, considering Kogito asserts are no more present in this repo. |
JIRA: https://issues.redhat.com/browse/KOGITO-4343
Related PRs:
kiegroup/gwt-jsonix-schema-compiler#11
kiegroup/droolsjbpm-build-bootstrap#1606
#3570
#3562
#3582
to test localy set gwt-jsonix-schema-compiler version to 1.3.0-SNAPSHOT
@yesamer ^^