Author: scabanovich
Date: 2012-04-27 20:01:33 -0400 (Fri, 27 Apr 2012)
New Revision: 40604
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/stereotype/defaultNamed/Sambar.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/stereotype/defaultNamed/StereotypeWithAdditionalStereotype.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/EnterpriseStereotypeDefinitionTest.java
Log:
JBIDE-11540
https://issues.jboss.org/browse/JBIDE-11540
Test is added.
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/stereotype/defaultNamed/Sambar.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/stereotype/defaultNamed/Sambar.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/stereotype/defaultNamed/Sambar.java 2012-04-28
00:01:33 UTC (rev 40604)
@@ -0,0 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.definition.stereotype.defaultNamed;
+
+
+@StereotypeWithAdditionalStereotype
+class Sambar
+{
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/stereotype/defaultNamed/Sambar.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/stereotype/defaultNamed/StereotypeWithAdditionalStereotype.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/stereotype/defaultNamed/StereotypeWithAdditionalStereotype.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/stereotype/defaultNamed/StereotypeWithAdditionalStereotype.java 2012-04-28
00:01:33 UTC (rev 40604)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.definition.stereotype.defaultNamed;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.inject.Stereotype;
+import javax.inject.Named;
+
+@Stereotype
+@Target( { TYPE })
+@Retention(RUNTIME)
+@StereotypeWithEmptyNamed
+@interface StereotypeWithAdditionalStereotype
+{
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/stereotype/defaultNamed/StereotypeWithAdditionalStereotype.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/EnterpriseStereotypeDefinitionTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/EnterpriseStereotypeDefinitionTest.java 2012-04-28
00:00:28 UTC (rev 40603)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/EnterpriseStereotypeDefinitionTest.java 2012-04-28
00:01:33 UTC (rev 40604)
@@ -14,6 +14,7 @@
import org.eclipse.jdt.core.JavaModelException;
import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IStereotypeDeclaration;
/**
* @author Alexey Kazakov
@@ -103,4 +104,12 @@
"javax.enterprise.context.SessionScoped", bean.getScope()
.getSourceType().getFullyQualifiedName());
}
+
+ public void testAdditionalStereotype() throws JavaModelException {
+ Set<IBean> beans =
getBeans("org.jboss.jsr299.tck.tests.definition.stereotype.defaultNamed.Sambar");
+ IBean bean = beans.iterator().next();
+ assertEquals("sambar", bean.getName());
+ Set<IStereotypeDeclaration> s = bean.getStereotypeDeclarations();
+ assertEquals(2, s.size());
+ }
}
\ No newline at end of file