public void testNewView() {
// dhnsGlobal.getGraphStructure().getMainView().getStructure().showTreeAsTable();
GraphViewImpl view = dhnsGlobal.getGraphStructure().getNewView();
// view.getStructure().showTreeAsTable();
for (TreeListIterator itr = new TreeListIterator(view.getStructure().getTree(), 1); itr.hasNext();) {
AbstractNode node = itr.next();
assertEquals(view.getViewId(), node.getViewId());
AbstractNode mainNode = node.getInView(0);
assertNotNull(mainNode);
assertNotSame(node, mainNode);
assertSame(node.getNodeData(), mainNode.getNodeData());
if (mainNode.parent != null) {
assertNotNull(node.parent);
assertEquals(node.parent.getViewId(), view.getViewId());
}
}
for (TreeListIterator itr = new TreeListIterator(view.getStructure().getTree(), 1); itr.hasNext();) {
AbstractNode node = itr.next();
AbstractNode mainNode = node.getInView(0);
assertEquals(node.getEdgesInTree().getCount(), mainNode.getEdgesInTree().getCount());
assertEquals(node.getEdgesOutTree().getCount(), mainNode.getEdgesOutTree().getCount());
for (AbstractEdge edge : node.getEdgesInTree()) {
assertSame(edge, mainNode.getEdgesInTree().getItem(edge.getSource().getNumber()));