Author: akazakov
Date: 2010-04-05 13:29:18 -0400 (Mon, 05 Apr 2010)
New Revision: 21269
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ScopeDefinitionTest.java
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/tck/EnterpriseQualifierDefinitionTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5808 Added new CDI Core tests
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-05
16:58:28 UTC (rev 21268)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreTestSuite.java 2010-04-05
17:29:18 UTC (rev 21269)
@@ -17,6 +17,7 @@
import org.jboss.tools.cdi.core.test.tck.EnterpriseQualifierDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.NameDefinitionTest;
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.ValidationTest;
/**
@@ -30,6 +31,7 @@
suite.addTestSuite(NameDefinitionTest.class);
suite.addTestSuite(QualifierDefinitionTest.class);
suite.addTestSuite(EnterpriseQualifierDefinitionTest.class);
+ suite.addTestSuite(ScopeDefinitionTest.class);
suite.addTestSuite(ValidationTest.class);
return suite;
}
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/EnterpriseQualifierDefinitionTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/EnterpriseQualifierDefinitionTest.java 2010-04-05
16:58:28 UTC (rev 21268)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/EnterpriseQualifierDefinitionTest.java 2010-04-05
17:29:18 UTC (rev 21269)
@@ -25,7 +25,7 @@
public class EnterpriseQualifierDefinitionTest extends TCKTest {
/**
- * section 4.1 id)
+ * section 4.1 al)
* @throws CoreException
*/
public void testQualifierDeclaredInheritedIsInherited() throws CoreException {
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ScopeDefinitionTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ScopeDefinitionTest.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ScopeDefinitionTest.java 2010-04-05
17:29:18 UTC (rev 21269)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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;
+import org.jboss.tools.cdi.core.IScopeDeclaration;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class ScopeDefinitionTest extends TCKTest {
+
+ /**
+ * section 2.4 c)
+ * @throws JavaModelException
+ */
+ public void testScopeTypesAreExtensible() throws JavaModelException {
+ Set<IBean> beans =
getBeans("org.jboss.jsr299.tck.tests.definition.scope.Mullet");
+ assertEquals("Wrong number of beans.", 1, beans.size());
+ IBean bean = beans.iterator().next();
+ assertEquals("Wrong scope type",
"org.jboss.jsr299.tck.tests.definition.scope.AnotherScopeType",
bean.getScope().getSourceType().getFullyQualifiedName());
+ Set<IScopeDeclaration> declarations = bean.getScopeDeclarations();
+ assertEquals("Wrong number of scope declarations", 1, declarations.size());
+ assertLocationEquals(declarations, 848, 17);
+ }
+}
\ 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/ScopeDefinitionTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain