font.setValue("big"); xpp3Dom.addChild(font); graph1.setAppData("foo", xpp3Dom); colour.setValue("red"); xpp3Dom2.addChild(colour); graph1.setAppData("baz", xpp3Dom2);
public void testApplicationData() throws Exception { Graph graph = new Graph("chain1"); assertNull(graph.getApplicationData("foo")); XppDom xpp3Dom1 = new XppDom(""); XppDom font = new XppDom("font"); font.setValue("big"); xpp3Dom1.addChild(font); graph.setAppData("foo", xpp3Dom1); assertSame(xpp3Dom1, graph.getApplicationData("foo")); XppDom xpp3Dom2 = new XppDom(""); XppDom font2 = new XppDom("font"); font2.setValue("small"); xpp3Dom2.addChild(font2); graph.setAppData("foo", xpp3Dom2); assertSame(xpp3Dom2, graph.getApplicationData("foo")); }