Author: scabanovich
Date: 2012-04-13 20:37:37 -0400 (Fri, 13 Apr 2012)
New Revision: 40189
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/implementation/simple/lifecycle/TameLion.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BeanSpecializationTest.java
Log:
JBIDE-11449
https://issues.jboss.org/browse/JBIDE-11449
Specialized Bean can set bean name if it is not inherited. - Test added.
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/implementation/simple/lifecycle/TameLion.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/implementation/simple/lifecycle/TameLion.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/implementation/simple/lifecycle/TameLion.java 2012-04-14
00:37:37 UTC (rev 40189)
@@ -0,0 +1,27 @@
+/*
+ * 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.implementation.simple.lifecycle;
+
+import javax.enterprise.inject.Specializes;
+import javax.inject.Named;
+
+@Specializes
+@Named
+class TameLion extends Lion
+{
+
+}
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/implementation/simple/lifecycle/TameLion.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/BeanSpecializationTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BeanSpecializationTest.java 2012-04-13
22:57:10 UTC (rev 40188)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BeanSpecializationTest.java 2012-04-14
00:37:37 UTC (rev 40189)
@@ -81,4 +81,11 @@
IBean bean = beans.iterator().next();
assertEquals("Incorrect bean name", "farmer", bean.getName());
}
+
+ public void testSimpleSpecializingBeanDefinesNameWhenSpecializedBeanIsNotNamed() throws
JavaModelException {
+ Set<IBean> beans = cdiProject.getBeans(true,
"org.jboss.jsr299.tck.tests.implementation.simple.lifecycle.TameLion",
"org.jboss.jsr299.tck.tests.implementation.simple.lifecycle.Tame");
+ assertEquals("Wrong number of beans.", 1, beans.size());
+ IBean bean = beans.iterator().next();
+ assertEquals("Incorrect bean name", "tameLion", bean.getName());
+ }
}
\ No newline at end of file