Author: scabanovich
Date: 2012-10-12 13:56:23 -0400 (Fri, 12 Oct 2012)
New Revision: 44492
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/pack/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/pack/package-info.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/lookup/PackageInfoTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
Log:
JBIDE-12841
https://issues.jboss.org/browse/JBIDE-12841
Test is added.
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/pack/package-info.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/pack/package-info.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/pack/package-info.java 2012-10-12
17:56:23 UTC (rev 44492)
@@ -0,0 +1,4 @@
+(a)Target(ElementType.FIELD)
+package org.jboss.jsr299.tck.tests.lookup.pack;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/pack/package-info.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2012-10-12
16:29:50 UTC (rev 44491)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2012-10-12
17:56:23 UTC (rev 44492)
@@ -52,6 +52,7 @@
import org.jboss.tools.cdi.core.test.tck.lookup.AmbiguousDependencyTest;
import org.jboss.tools.cdi.core.test.tck.lookup.CircularDependencyTest;
import org.jboss.tools.cdi.core.test.tck.lookup.DynamicLookupTest;
+import org.jboss.tools.cdi.core.test.tck.lookup.PackageInfoTest;
import org.jboss.tools.cdi.core.test.tck.lookup.ResolutionByNameTest;
import org.jboss.tools.cdi.core.test.tck.lookup.ResolutionByTypeTest;
import org.jboss.tools.cdi.core.test.tck.lookup.UnsatisfiedDependencyTest;
@@ -96,6 +97,7 @@
// TCK project tests
suite.addTestSuite(ELReferenceTest.class);
suite.addTestSuite(ResolutionByNameTest.class);
+ suite.addTestSuite(PackageInfoTest.class);
suite.addTestSuite(BeanDefinitionTest.class);
suite.addTestSuite(NameDefinitionTest.class);
suite.addTestSuite(QualifierDefinitionTest.class);
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/lookup/PackageInfoTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/lookup/PackageInfoTest.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/lookup/PackageInfoTest.java 2012-10-12
17:56:23 UTC (rev 44492)
@@ -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.lookup;
+
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.cdi.core.test.tck.TCKTest;
+import org.jboss.tools.cdi.internal.core.impl.definition.PackageDefinition;
+import org.jboss.tools.common.java.impl.AnnotationDeclaration;
+
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class PackageInfoTest extends TCKTest {
+
+ /**
+
+s * @throws CoreException
+ */
+ public void testDeclaration() throws CoreException {
+ PackageDefinition d =
cdiProject.getNature().getDefinitions().getPackageDefinition("org.jboss.jsr299.tck.tests.lookup.pack");
+ assertNotNull(d);
+ AnnotationDeclaration a = d.getAnnotation("java.lang.annotation.Target");
+ Object o = a.getMemberValue("value");
+ assertEquals("java.lang.annotation.ElementType.FIELD", o);
+ }
+
+}
\ 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/lookup/PackageInfoTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain