Programmatically opening Junit test case creation wizard [message #325306] |
Thu, 14 February 2008 00:33  |
Eclipse User |
|
|
|
Originally posted by: abinashsahu.hsbc.co.in
Hi,
I want to open the <b>"unit test case creation wizard"</b> programmatically to create a test case in eclipse but when i try with the following code it gives me Null pointer exception.
Code:
NewTestCaseCreationWizard wizard=new NewTestCaseCreationWizard();
wizard.init(workbench,new StructuredSelection());
WizardDialog dialog = new WizardDialog(shell, wizard);
dialog.create();
dialog.open();
Exception :
java.lang.NullPointerException
at org.eclipse.jdt.internal.junit.ui.JUnitPlugin.getImageDescri ptor(JUnitPlugin.java:162)
at org.eclipse.jdt.internal.junit.wizards.NewTestCaseCreationWi zard.initializeDefaultPageImageDescriptor(NewTestCaseCreatio nWizard.java:37)
at org.eclipse.jdt.internal.junit.wizards.JUnitWizard.<init>(JUnitWizard.java:52)
at org.eclipse.jdt.internal.junit.wizards.NewTestCaseCreationWi zard. <init>(NewTestCaseCreationWizard.java:31)
at com.hsbc.es.cheatsheet.cdm.lab.reqresprocessing.action.Creat eJUnitTestCase.run(CreateJUnitTestCase.java:53)
When I try the same for NewClassCreationWizard it works fine.
Please advice what could be the problem.
Thanks and Regards
Abinash.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03824 seconds