Author: jjankovi
Date: 2012-03-21 10:08:39 -0400 (Wed, 21 Mar 2012)
New Revision: 39706
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/VetoAnnotationTest.java
Log:
VetoAnnotationTest implementation finished
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/VetoAnnotationTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/VetoAnnotationTest.java 2012-03-21
14:06:59 UTC (rev 39705)
+++
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/VetoAnnotationTest.java 2012-03-21
14:08:39 UTC (rev 39706)
@@ -16,7 +16,6 @@
import org.jboss.tools.cdi.bot.test.annotations.ProblemsType;
import org.jboss.tools.cdi.seam3.bot.test.base.SolderTestBase;
import org.jboss.tools.cdi.seam3.bot.test.util.SeamLibraries;
-import org.junit.Ignore;
import org.junit.Test;
public class VetoAnnotationTest extends SolderTestBase {
@@ -38,7 +37,6 @@
}
-
@Test
public void testManagedBeans() {
@@ -130,23 +128,33 @@
true, "manager");
}
- @Ignore
+
@Test
public void testObserverMethods() {
+ String vetoBean = "Bean";
+ String projectName = "veto5";
+ String eventAttribute = "eventAttribute";
+ importProjectWithLibrary(projectName, SeamLibraries.SOLDER);
- }
- /*@Ignore
- @Test
- public void testDecorator() {
+ setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
+ "cdi.seam", APPLICATION_CLASS).toTextEditor());
+ assertFalse(openOnUtil.openOnByOption(eventAttribute, APPLICATION_CLASS,
+ CDIConstants.OPEN_CDI_OBSERVER_METHOD));
+
+ setEd(packageExplorer.openFile(projectName, CDIConstants.SRC,
+ "cdi.seam", vetoBean + ".java").toTextEditor());
+ editResourceUtil.replaceInEditor("@Veto", "");
+ editResourceUtil.replaceInEditor("import org.jboss.seam.solder.core.Veto;",
"");
+
+ assertTrue(openOnUtil.openOnByOption(eventAttribute, APPLICATION_CLASS,
+ CDIConstants.OPEN_CDI_OBSERVER_METHOD));
+ assertTrue(getEd().getTitle().equals(vetoBean + ".java"));
+ assertTrue(getEd().getSelection().equals("method"));
+
}
- @Ignore
- @Test
- public void testInterceptor() {
-
- }*/
private void testVetoAnnotationImproperValue(String projectName) {