Author: akazakov
Date: 2010-04-07 09:27:06 -0400 (Wed, 07 Apr 2010)
New Revision: 21304
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/StereotypeInheritenceTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreTestSuite.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5808 Added new CDI tests for Stereotypes.
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreTestSuite.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreTestSuite.java 2010-04-07
13:08:14 UTC (rev 21303)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreTestSuite.java 2010-04-07
13:27:06 UTC (rev 21304)
@@ -22,6 +22,7 @@
import org.jboss.tools.cdi.core.test.tck.QualifierDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.ScopeDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.StereotypeDefinitionTest;
+import org.jboss.tools.cdi.core.test.tck.StereotypeInheritenceTest;
import org.jboss.tools.cdi.core.test.tck.ValidationTest;
/**
@@ -40,6 +41,7 @@
suite.addTestSuite(StereotypeDefinitionTest.class);
suite.addTestSuite(DefaultNamedTest.class);
suite.addTestSuite(EnterpriseStereotypeDefinitionTest.class);
+ suite.addTestSuite(StereotypeInheritenceTest.class);
suite.addTestSuite(ValidationTest.class);
return suite;
}
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/StereotypeInheritenceTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/StereotypeInheritenceTest.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/StereotypeInheritenceTest.java 2010-04-07
13:27:06 UTC (rev 21304)
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core.test.tck;
+
+import java.util.Set;
+
+import org.eclipse.jdt.core.JavaModelException;
+import org.jboss.tools.cdi.core.IBean;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class StereotypeInheritenceTest extends TCKTest {
+
+ /**
+ * section 2.7.1.5 a)
+ * section 2.7.1.5 b)
+ *
+ * @throws JavaModelException
+ */
+ public void testInheritence() throws JavaModelException {
+ Set<IBean> beans =
getBeans("org.jboss.jsr299.tck.tests.definition.stereotype.inheritance.Horse");
+ assertEquals("Wrong number of beans.", 1, beans.size());
+ IBean bean = beans.iterator().next();
+ assertEquals("Wrong scope type",
+ "javax.enterprise.context.RequestScoped", bean.getScope()
+ .getSourceType().getFullyQualifiedName());
+ assertTrue("The bean should be an alternative.", bean.isAlternative());
+ assertEquals("Wrong EL name.", "horse", bean.getName());
+ }
+}
\ No newline at end of file
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/StereotypeInheritenceTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain