use of org.apache.tools.ant.util.ReaderInputStream in project kie-wb-common by kiegroup.
the class DMNMarshallerStandaloneTest method test_decisionservice_1outputDecision.
@Test
public void test_decisionservice_1outputDecision() throws IOException {
final DMNMarshallerStandalone m = getDMNMarshaller();
@SuppressWarnings("unchecked") final Graph<?, Node<?, ?>> g = m.unmarshall(createMetadata(), this.getClass().getResourceAsStream("/DROOLS-3372.dmn"));
Node<?, ?> nodeDS = g.getNode("_659a06e2-ae80-496c-8783-f790a640bb49");
Node<?, ?> nodeDecisionPostfix = g.getNode("_3a69915a-30af-4de3-a07f-6be514f53caa");
moveNode(nodeDecisionPostfix, 0, -280);
makeNodeChildOf(nodeDecisionPostfix, nodeDS);
DiagramImpl diagram = createDiagram();
diagram.setGraph(g);
String mString = m.marshall(diagram);
LOG.debug("MARSHALLED ROUNDTRIP RESULTING xml:\n{}\n", mString);
roundTripUnmarshalThenMarshalUnmarshal(new ReaderInputStream(new StringReader(mString)), this::check_decisionservice_1outputDecision);
}
use of org.apache.tools.ant.util.ReaderInputStream in project kie-wb-common by kiegroup.
the class DMNMarshallerStandaloneTest method test_decisionservice2_remove_1outputDecision1encapsulatedDecision.
@Test
public void test_decisionservice2_remove_1outputDecision1encapsulatedDecision() throws IOException {
final DMNMarshallerStandalone m = getDMNMarshaller();
@SuppressWarnings("unchecked") final Graph<?, Node<?, ?>> g = m.unmarshall(createMetadata(), this.getClass().getResourceAsStream("/DROOLS-3372bis.dmn"));
Node<?, ?> nodeDS = g.getNode("_659a06e2-ae80-496c-8783-f790a640bb49");
Node<?, ?> nodeDecisionPostfix = g.getNode("_3a69915a-30af-4de3-a07f-6be514f53caa");
Node<?, ?> nodeDecisionPrefix = g.getNode("_afce4fb3-9a7c-4791-bbfe-63d4b76bd61a");
moveNode(nodeDecisionPostfix, 0, -280);
makeNodeChildOf(nodeDecisionPostfix, nodeDS);
moveNode(nodeDecisionPrefix, 0, -170);
makeNodeChildOf(nodeDecisionPrefix, nodeDS);
DiagramImpl diagram = createDiagram();
Node<?, ?> nodeEncaps1 = g.getNode("_ca9d65e7-a5fa-4a13-98b7-8404f4601147");
moveNode(nodeEncaps1, 0, +400);
removeNodeChildOf(nodeEncaps1, nodeDS);
Node<?, ?> nodeEncaps2 = g.getNode("_4b02cf97-5f9b-48ee-a4ae-229233238876");
moveNode(nodeEncaps2, 0, +400);
removeNodeChildOf(nodeEncaps2, nodeDS);
Node<?, ?> nodeHardcoded2 = g.getNode("_8878539e-1c50-4622-b601-5878c97dc34e");
moveNode(nodeHardcoded2, 0, +400);
removeNodeChildOf(nodeHardcoded2, nodeDS);
diagram.setGraph(g);
String mString = m.marshall(diagram);
LOG.debug("MARSHALLED ROUNDTRIP RESULTING xml:\n{}\n", mString);
roundTripUnmarshalThenMarshalUnmarshal(new ReaderInputStream(new StringReader(mString)), this::check_decisionservice2_remove_1outputDecision1encapsulatedDecision);
}
use of org.apache.tools.ant.util.ReaderInputStream in project kie-wb-common by kiegroup.
the class DMNMarshallerStandaloneTest method test_decisionservice_1outputDecision1encapsulatedDecision.
@Test
public void test_decisionservice_1outputDecision1encapsulatedDecision() throws IOException {
final DMNMarshallerStandalone m = getDMNMarshaller();
@SuppressWarnings("unchecked") final Graph<?, Node<?, ?>> g = m.unmarshall(createMetadata(), this.getClass().getResourceAsStream("/DROOLS-3372.dmn"));
Node<?, ?> nodeDS = g.getNode("_659a06e2-ae80-496c-8783-f790a640bb49");
Node<?, ?> nodeDecisionPostfix = g.getNode("_3a69915a-30af-4de3-a07f-6be514f53caa");
Node<?, ?> nodeDecisionPrefix = g.getNode("_afce4fb3-9a7c-4791-bbfe-63d4b76bd61a");
moveNode(nodeDecisionPostfix, 0, -280);
makeNodeChildOf(nodeDecisionPostfix, nodeDS);
moveNode(nodeDecisionPrefix, 0, -170);
makeNodeChildOf(nodeDecisionPrefix, nodeDS);
DiagramImpl diagram = createDiagram();
diagram.setGraph(g);
String mString = m.marshall(diagram);
LOG.debug("MARSHALLED ROUNDTRIP RESULTING xml:\n{}\n", mString);
roundTripUnmarshalThenMarshalUnmarshal(new ReaderInputStream(new StringReader(mString)), this::check_decisionservice_1outputDecision1encapsulatedDecision);
}
Aggregations