gephi.team team mailing list archive
-
gephi.team team
-
Mailing list archive
-
Message #02171
Re: [Question #157804]: Unit testing problems
Question #157804 on Gephi changed:
https://answers.launchpad.net/gephi/+question/157804
Status: Open => Answered
Mathieu Bastian proposed the following answer:
Graph models are binded to workspaces and the GraphController.getModel()
method will only give you one if a workspace is currently available.
To fix that, do
ProjectController projectController = Lookup.getDefault().lookup(ProjectController.class);
projectController.newProject();
at the beginning of your unit test code.
See also
http://wiki.gephi.org/index.php/NetBeans_Tips#How_to_use_other_modules_in_Unit_Test
And yes I agree we need more unit tests, especially in Modules we
consider stable
--
You received this question notification because you are a member of
Gephi Team, which is an answer contact for Gephi.