use of org.drools.workbench.screens.guided.dtable.model.GuidedDecisionTableEditorGraphModel in project drools-wb by kiegroup.
the class GuidedDTGraphXMLPersistenceTest method checkMarshallingModelWithoutEntryPosition.
@Test
public void checkMarshallingModelWithoutEntryPosition() {
final Path path = PathFactory.newPath("path", "default://path");
final GuidedDecisionTableEditorGraphModel model = new GuidedDecisionTableEditorGraphModel();
model.getEntries().add(new GuidedDecisionTableEditorGraphModel.GuidedDecisionTableGraphEntry(path, path));
final String xml = GuidedDTGraphXMLPersistence.getInstance().marshal(model);
assertNotNull(xml);
assertEqualsIgnoreWhitespace("<graph>\n" + " <entries>\n" + " <entry>\n" + " <pathHead class=\"org.uberfire.backend.vfs.PathFactory$PathImpl\">\n" + " <uri>default://path</uri>\n" + " <fileName>path</fileName>\n" + " <attributes/>\n" + " <hasVersionSupport>false</hasVersionSupport>\n" + " </pathHead>\n" + " <pathVersion class=\"org.uberfire.backend.vfs.PathFactory$PathImpl\" reference=\"../pathHead\"/>\n" + " </entry>\n" + " </entries>\n" + "</graph>", xml);
}
use of org.drools.workbench.screens.guided.dtable.model.GuidedDecisionTableEditorGraphModel in project drools-wb by kiegroup.
the class GuidedDTGraphXMLPersistenceTest method checkUnmarshallingCorruptString.
@Test
public void checkUnmarshallingCorruptString() {
final GuidedDecisionTableEditorGraphModel model = GuidedDTGraphXMLPersistence.getInstance().unmarshal("cheese");
assertEmptyModel(model);
}
Aggregations