Author: scabanovich
Date: 2011-01-18 13:20:46 -0500 (Tue, 18 Jan 2011)
New Revision: 28370
Modified:
branches/jbosstools-3.2.0.CR1/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWizardTest.java
Log:
JBIDE-8124
https://issues.jboss.org/browse/JBIDE-8124
Modified:
branches/jbosstools-3.2.0.CR1/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWizardTest.java
===================================================================
---
branches/jbosstools-3.2.0.CR1/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWizardTest.java 2011-01-18
18:01:01 UTC (rev 28369)
+++
branches/jbosstools-3.2.0.CR1/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIWizardTest.java 2011-01-18
18:20:46 UTC (rev 28370)
@@ -43,6 +43,7 @@
import org.jboss.tools.cdi.ui.CDIUIPlugin;
//import org.jboss.tools.cdi.ui.wizard.NewCDIAnnotationWizardPage;
import org.jboss.tools.cdi.ui.wizard.NewAnnotationLiteralWizardPage;
+import org.jboss.tools.cdi.ui.wizard.NewBeanWizardPage;
import org.jboss.tools.cdi.ui.wizard.NewBeansXMLCreationWizard;
import org.jboss.tools.cdi.ui.wizard.NewDecoratorWizardPage;
import org.jboss.tools.cdi.ui.wizard.NewInterceptorBindingWizardPage;
@@ -71,6 +72,7 @@
static String INTERCEPTOR_BINDING2_NAME = "MyInterceptorBinding2";
static String INTERCEPTOR_NAME = "MyInterceptor";
static String DECORATOR_NAME = "MapDecorator<K,V>";
+ static String BEAN_NAME = "MyBean";
static class WizardContext {
NewElementWizard wizard;
@@ -371,6 +373,30 @@
}
}
+ public void testNewBeanWizard() {
+ WizardContext context = new WizardContext();
+ context.init("org.jboss.tools.cdi.ui.wizard.NewBeanCreationWizard",
+ PACK_NAME, BEAN_NAME);JobUtils.waitForIdle(2000);
+ JobUtils.waitForIdle(2000);
+ ICDIProject cdi = CDICorePlugin.getCDIProject(context.tck, true);
+
+ try {
+ NewBeanWizardPage page = (NewBeanWizardPage)context.page;
+
+ page.setBeanName("myNewBean");
+
+ context.wizard.performFinish();
+
+ String text = context.getNewTypeContent();
+ System.out.println(text);
+
+ assertTrue(text.contains("@Named"));
+ assertTrue(text.contains("\"myNewBean\""));
+ } finally {
+ context.close();
+ }
+ }
+
public void testNewAnnotationLiteralWizard() {
WizardContext context = new WizardContext();
context.init("org.jboss.tools.cdi.ui.wizard.NewAnnotationLiteralCreationWizard",