public void setUp() {
ProjectController projectController = Lookup.getDefault().lookup(ProjectController.class);
projectController.newProject();
projectController.newWorkspace(projectController.getCurrentProject());
ImportController importController = Lookup.getDefault().lookup(ImportController.class);
Container container;
try {
File file = new File(getClass().getResource("/org/gephi/dynamic/test_graph.gexf").toURI());
container = importController.importFile(file);
}
catch (Exception ex) {
Exceptions.printStackTrace(ex);
return;
}
importController.process(container, new DefaultProcessor(), projectController.getCurrentWorkspace());
GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
graphModel = graphController.getModel();
}