[webbeans-commits] Webbeans SVN: r1593 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-18 20:36:41 -0500 (Wed, 18 Feb 2009)
New Revision: 1593
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java
Log:
mark as broken
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java 2009-02-19 01:19:45 UTC (rev 1592)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java 2009-02-19 01:36:41 UTC (rev 1593)
@@ -194,7 +194,7 @@
}
- @Test
+ @Test(groups="broken")
@SpecAssertion(section = "3.2.6.1", id = "b")
public void testImplicitConstructorUsed()
{
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1592 - in tck/trunk/impl/src/main: resources and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-18 20:19:45 -0500 (Wed, 18 Feb 2009)
New Revision: 1592
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/Order.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Map the rest of Simple bean definiton
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/Order.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/Order.java 2009-02-19 01:11:29 UTC (rev 1591)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/Order.java 2009-02-19 01:19:45 UTC (rev 1592)
@@ -6,4 +6,6 @@
class Order
{
+ public static boolean constructed = true;
+
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java 2009-02-19 01:11:29 UTC (rev 1591)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java 2009-02-19 01:19:45 UTC (rev 1592)
@@ -4,7 +4,6 @@
import java.util.List;
import javax.inject.DefinitionException;
-import javax.inject.manager.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
@@ -177,7 +176,7 @@
}
@Test
- @SpecAssertion(section = "3.2.5.1", id = "unknown")
+ @SpecAssertion(section = "3.2.6.1", id = "a")
public void testInitializerAnnotatedConstructor() throws Exception
{
deployBeans(Sheep.class);
@@ -186,6 +185,7 @@
@Override
protected void execute() throws Exception
{
+ Sheep.constructedCorrectly = false;
getCurrentManager().getInstanceByType(Sheep.class);
assert Sheep.constructedCorrectly;
@@ -195,23 +195,29 @@
}
@Test
- @SpecAssertion(section = "3.2.5.1", id = "unknown")
+ @SpecAssertion(section = "3.2.6.1", id = "b")
public void testImplicitConstructorUsed()
{
- Bean<Order> order = createSimpleBean(Order.class);
- // TODO Test this properly!
+ deployBeans(Order.class);
+ Order.constructed = false;
+ getCurrentManager().getInstanceByType(Order.class);
+ assert Order.constructed;
}
@Test
- @SpecAssertion(section = "3.2.6.1", id = "unknown")
+ @SpecAssertions({
+ @SpecAssertion(section = "3.2.5", id = "a"),
+ @SpecAssertion(section = "3.2.6.1", id = "b")
+ })
public void testEmptyConstructorUsed()
{
+ Donkey.constructedCorrectly = false;
createSimpleBean(Donkey.class).create(new MockCreationalContext<Donkey>());
assert Donkey.constructedCorrectly;
}
@Test
- @SpecAssertion(section = "3.2.6.1", id = "unknown")
+ @SpecAssertion(section = "3.2.6.1", id = "a")
public void testInitializerAnnotatedConstructorUsedOverEmptyConstuctor() throws Exception
{
deployBeans(Turkey.class);
@@ -227,14 +233,14 @@
}
@Test(expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.2.6.1", id = "unknown")
+ @SpecAssertion(section = "3.2.6.1", id = "c")
public void testTooManyInitializerAnnotatedConstructor()
{
createSimpleBean(Goose_Broken.class);
}
@Test(expectedExceptions = DefinitionException.class, groups = { "broken", "disposalMethod" })
- @SpecAssertion(section = "3.2.6.1", id = "unknown")
+ @SpecAssertion(section = "3.2.6.1", id = "d")
public void testConstructorHasDisposesParameter() throws Exception
{
deployBeans(DisposingConstructor_Broken.class, Duck.class);
@@ -251,35 +257,35 @@
}
@Test(expectedExceptions = DefinitionException.class, groups = { "broken", "observerMethod" })
- @SpecAssertion(section = "3.2.6.1", id = "unknown")
+ @SpecAssertion(section = "3.2.6.1", id = "e")
public void testConstructorHasObservesParameter()
{
deployBeans(ObservingConstructor_Broken.class);
}
@Test(groups = { "stub", "webbeansxml" })
- @SpecAssertion(section = "3.2.6.2", id = "unknown")
+ @SpecAssertion(section = "3.2.6.2", id = "b")
public void testImplicitConstructorDeclaredInXmlUsed()
{
assert false;
}
@Test(groups = { "stub", "webbeansxml" })
- @SpecAssertion(section = "3.2.6.2", id = "unknown")
+ @SpecAssertion(section = "3.2.6.2", id = "b")
public void testEmptyConstructorDeclaredInXmlUsed()
{
assert false;
}
@Test(expectedExceptions = DefinitionException.class, groups = { "stub", "webbeansxml" })
- @SpecAssertion(section = "3.2.6.2", id = "unknown")
+ @SpecAssertion(section = "3.2.6.2", id = "c")
public void testConstructorDeclaredInXmlDoesNotExist()
{
assert false;
}
@Test(groups = { "stub", "webbeansxml" })
- @SpecAssertion(section = "3.2.6.2", id = "unknown")
+ @SpecAssertion(section = "3.2.6.2", id = "d")
public void testConstructorDeclaredInXmlIgnoresBindingTypesDeclaredInJava()
{
assert false;
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 01:11:29 UTC (rev 1591)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 01:19:45 UTC (rev 1592)
@@ -862,13 +862,11 @@
</section>
<section id="3.2.6" title="Bean constructors">
+
<assertion id="a">
<text>When the container instantiates a simple bean, it calls the bean constructor. The bean constructor is a constructor of the bean class</text>
</assertion>
- <assertion id="b">
- <text>The application may call bean constructors directly. However, if the application directly instantiates the bean, no parameters are passed to the constructor by the container; the returned object is not bound to any context; no dependencies are injected by the container; and the lifecycle of the new instance is not managed by the container</text>
- </assertion>
</section>
<section id="3.2.6.1" title="Declaring a bean constructor using annotations">
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1591 - in tck/trunk/impl/src/main: resources and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-18 20:11:29 -0500 (Wed, 18 Feb 2009)
New Revision: 1591
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/NewSimpleBeanTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
assertions for new simple beans
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/NewSimpleBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/NewSimpleBeanTest.java 2009-02-19 01:03:15 UTC (rev 1590)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/NewSimpleBeanTest.java 2009-02-19 01:11:29 UTC (rev 1591)
@@ -13,8 +13,8 @@
import javax.inject.Standard;
import javax.inject.manager.Bean;
-import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.jboss.jsr299.tck.literals.NewLiteral;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -42,293 +42,65 @@
newSimpleBean = beans.iterator().next();
}
- /**
- * Additionally, for each such simple bean, a second simple bean exists
- * which:
- *
- * • has the same bean class,
- *
- * • has the same bean constructor, initializer methods and injected fields
- * defined by annotations, and
- *
- * • has the same interceptor bindings defined by annotations.
- *
- * However, this second bean:
- *
- * • has scope @Dependent,
- *
- * • has deployment type @Standard,
- *
- * • has @javax.inject.New as the only binding,
- *
- * • has no bean name,
- *
- * • has no stereotypes, and
- *
- * • has no observer methods, producer methods or fields or disposal methods.
- */
@Test(groups = { "new" })
- @SpecAssertion(section = "3.2.5", id = "unknown")
+ @SpecAssertion(section = "3.2.5", id = "d")
public void testNewBeanIsDependentScoped()
{
assert Dependent.class.equals(newSimpleBean.getScopeType());
}
- /**
- * Additionally, for each such simple bean, a second simple bean exists
- * which:
- *
- * • has the same bean class,
- *
- * • has the same bean constructor, initializer methods and injected fields
- * defined by annotations, and
- *
- * • has the same interceptor bindings defined by annotations.
- *
- * However, this second bean:
- *
- * • has scope @Dependent,
- *
- * • has deployment type @Standard,
- *
- * • has @javax.inject.New as the only binding,
- *
- * • has no bean name,
- *
- * • has no stereotypes, and
- *
- * • has no observer methods, producer methods or fields or disposal methods.
- */
@Test(groups = { "new" })
- @SpecAssertion(section = "3.2.5", id = "unknown")
+ @SpecAssertion(section = "3.2.5", id = "e")
public void testNewBeanIsOfStandardDeploymentType()
{
assert Standard.class.equals(newSimpleBean.getDeploymentType());
}
- /**
- * Additionally, for each such simple bean, a second simple bean exists
- * which:
- *
- * • has the same bean class,
- *
- * • has the same bean constructor, initializer methods and injected fields
- * defined by annotations, and
- *
- * • has the same interceptor bindings defined by annotations.
- *
- * However, this second bean:
- *
- * • has scope @Dependent,
- *
- * • has deployment type @Standard,
- *
- * • has @javax.inject.New as the only binding,
- *
- * • has no bean name,
- *
- * • has no stereotypes, and
- *
- * • has no observer methods, producer methods or fields or disposal methods.
- */
@Test(groups = { "new" })
- @SpecAssertion(section = "3.2.5", id = "unknown")
+ @SpecAssertion(section = "3.2.5", id = "f")
public void testNewBeanHasOnlyNewBinding()
{
assert newSimpleBean.getBindings().size() == 1;
assert newSimpleBean.getBindings().iterator().next().annotationType().equals(new NewLiteral().annotationType());
}
- /**
- * Additionally, for each such simple bean, a second simple bean exists
- * which:
- *
- * • has the same bean class,
- *
- * • has the same bean constructor, initializer methods and injected fields
- * defined by annotations, and
- *
- * • has the same interceptor bindings defined by annotations.
- *
- * However, this second bean:
- *
- * • has scope @Dependent,
- *
- * • has deployment type @Standard,
- *
- * • has @javax.inject.New as the only binding,
- *
- * • has no bean name,
- *
- * • has no stereotypes, and
- *
- * • has no observer methods, producer methods or fields or disposal methods.
- */
@Test(groups = { "new" })
- @SpecAssertion(section = "3.2.5", id = "unknown")
+ @SpecAssertion(section = "3.2.5", id = "g")
public void testNewBeanHasNoWebBeanName()
{
assert newSimpleBean.getName() == null;
}
- /**
- * Additionally, for each such simple bean, a second simple bean exists
- * which:
- *
- * • has the same bean class,
- *
- * • has the same bean constructor, initializer methods and injected fields
- * defined by annotations, and
- *
- * • has the same interceptor bindings defined by annotations.
- *
- * However, this second bean:
- *
- * • has scope @Dependent,
- *
- * • has deployment type @Standard,
- *
- * • has @javax.inject.New as the only binding,
- *
- * • has no bean name,
- *
- * • has no stereotypes, and
- *
- * • has no observer methods, producer methods or fields or disposal methods.
- * TODO API does not provide a way to see what stereotypes are applied on a bean
- */
- @Test(groups = { "underInvestigation", "new" })
- @SpecAssertion(section = "3.2.5", id = "unknown")
+ @Test(groups = { "stub", "new" })
+ @SpecAssertion(section = "3.2.5", id = "h")
public void testNewBeanHasNoStereotypes()
{
assert false;
}
- /**
- * Additionally, for each such simple bean, a second simple bean exists
- * which:
- *
- * • has the same bean class,
- *
- * • has the same bean constructor, initializer methods and injected fields
- * defined by annotations, and
- *
- * • has the same interceptor bindings defined by annotations.
- *
- * However, this second bean:
- *
- * • has scope @Dependent,
- *
- * • has deployment type @Standard,
- *
- * • has @javax.inject.New as the only binding,
- *
- * • has no bean name,
- *
- * • has no stereotypes, and
- *
- * • has no observer methods, producer methods or fields or disposal methods.
- */
- @Test(groups = { "new", "underInvestigation" })
- @SpecAssertion(section = "3.2.5", id = "unknown")
+ @Test(groups = { "new", "stub" })
+ @SpecAssertion(section = "3.2.5", id = "i")
public void testNewBeanHasNoObservers()
{
assert false;
}
- /**
- * Additionally, for each such simple bean, a second simple bean exists
- * which:
- *
- * • has the same bean class,
- *
- * • has the same bean constructor, initializer methods and injected fields
- * defined by annotations, and
- *
- * • has the same interceptor bindings defined by annotations.
- *
- * However, this second bean:
- *
- * • has scope @Dependent,
- *
- * • has deployment type @Standard,
- *
- * • has @javax.inject.New as the only binding,
- *
- * • has no bean name,
- *
- * • has no stereotypes, and
- *
- * • has no observer methods, producer methods or fields or disposal methods.
- * TODO The API does not provide any way to see producer fields from the new bean
- */
- @Test(groups = { "new", "underInvestigation" })
- @SpecAssertion(section = "3.2.5", id = "unknown")
+ @Test(groups = { "new", "stub" })
+ @SpecAssertion(section = "3.2.5", id = "k")
public void testNewBeanHasNoProducerFields()
{
assert false;
}
- /**
- * Additionally, for each such simple bean, a second simple bean exists
- * which:
- *
- * • has the same bean class,
- *
- * • has the same bean constructor, initializer methods and injected fields
- * defined by annotations, and
- *
- * • has the same interceptor bindings defined by annotations.
- *
- * However, this second bean:
- *
- * • has scope @Dependent,
- *
- * • has deployment type @Standard,
- *
- * • has @javax.inject.New as the only binding,
- *
- * • has no bean name,
- *
- * • has no stereotypes, and
- *
- * • has no observer methods, producer methods or fields or disposal methods.
- */
- @Test(groups = { "new", "underInvestigation" })
- @SpecAssertion(section = "3.2.5", id = "unknown")
+ @Test(groups = { "new", "stub" })
+ @SpecAssertion(section = "3.2.5", id = "j")
public void testNewBeanHasNoProducerMethods()
{
assert false;
}
- /**
- * Additionally, for each such simple bean, a second simple bean exists
- * which:
- *
- * • has the same bean class,
- *
- * • has the same bean constructor, initializer methods and injected fields
- * defined by annotations, and
- *
- * • has the same interceptor bindings defined by annotations.
- *
- * However, this second bean:
- *
- * • has scope @Dependent,
- *
- * • has deployment type @Standard,
- *
- * • has @javax.inject.New as the only binding,
- *
- * • has no bean name,
- *
- * • has no stereotypes, and
- *
- * • has no observer methods, producer methods or fields or disposal methods.
- * TODO API does not provide a way to detect if disposal methods exist on a bean
- */
@Test(groups = { "new", "underInvestigation" })
- @SpecAssertion(section = "3.2.5", id = "unknown")
+ @SpecAssertion(section = "3.2.5", id = "l")
public void testNewBeanHasNoDisposalMethods()
{
// Class<?> type =
@@ -338,72 +110,14 @@
assert false;
}
- /**
- * Additionally, for each such simple bean, a second simple bean exists
- * which:
- *
- * • has the same bean class,
- *
- * • has the same bean constructor, initializer methods and injected fields
- * defined by annotations, and
- *
- * • has the same interceptor bindings defined by annotations.
- *
- * However, this second bean:
- *
- * • has scope @Dependent,
- *
- * • has deployment type @Standard,
- *
- * • has @javax.inject.New as the only binding,
- *
- * • has no bean name,
- *
- * • has no stereotypes, and
- *
- * • has no observer methods, producer methods or fields or disposal methods.
- */
@Test(groups = { "stub", "new" })
- @SpecAssertion(section = "3.2.5", id = "unknown")
+ @SpecAssertion(section = "3.2.5", id = "c")
public void testNewBeanHasSameInterceptorMethodsAsWrappedBean()
{
assert false;
}
/**
- * Additionally, for each such simple bean, a second simple bean exists
- * which:
- *
- * • has the same bean class,
- *
- * • has the same bean constructor, initializer methods and injected fields
- * defined by annotations, and
- *
- * • has the same interceptor bindings defined by annotations.
- *
- * However, this second bean:
- *
- * • has scope @Dependent,
- *
- * • has deployment type @Standard,
- *
- * • has @javax.inject.New as the only binding,
- *
- * • has no bean name,
- *
- * • has no stereotypes, and
- *
- * • has no observer methods, producer methods or fields or disposal methods.
- */
- @Test(groups = { "new", "broken" })
- @SpecAssertion(section = "3.2.5", id = "unknown")
- public void testNewBeanHasNoDecorators()
- {
- Annotation[] bindingTypes = newSimpleBean.getBindings().toArray(new Annotation[0]);
- assert getCurrentManager().resolveDecorators(newSimpleBean.getTypes(), bindingTypes).isEmpty();
- }
-
- /**
* The @New annotation or <New> element may be applied to any field of a Web
* Bean implementation class or to any parameter of a producer method,
* initializer method, disposal method or Web Bean constructor where the type
@@ -519,7 +233,7 @@
}
@Test
- @SpecAssertion(section = "3.2.5", id = "unknown")
+ @SpecAssertion(section = "3.2.5", id = "a")
public void testForEachSimpleBeanANewBeanExists()
{
deployBeans(Order.class, Lion.class);
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 01:03:15 UTC (rev 1590)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 01:11:29 UTC (rev 1591)
@@ -694,9 +694,12 @@
<assertion id="cb">
<text>A top-level Java class is not a simple bean if it is an interface</text>
</assertion>
- <assertion id="d">
- <text>A top-level Java class is only a simple bean if it is annotated @Decorator.</text>
+ <assertion id="da">
+ <text>A top-level abstract Java class is a simple bean if it is annotated @Decorator.</text>
</assertion>
+ <assertion id="db">
+ <text>A top-level interface Java class is a simple bean if it is annotated @Decorator.</text>
+ </assertion>
<assertion id="e">
<text>A top-level Java class is not a simple bean if it is annotated with the JPA @Entity annotation</text>
</assertion>
@@ -804,10 +807,18 @@
<text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such simple bean, a second simple bean exists which has the same bean class</text>
</assertion>
- <assertion id="b">
+ <assertion id="ba">
<text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such simple bean, a second simple bean exists which has the same bean constructor, initializer methods and injected fields defined by annotations</text>
+Additionally, for each such simple bean, a second simple bean exists which has the same bean constructor defined by annotations</text>
</assertion>
+ <assertion id="bb">
+ <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such simple bean, a second simple bean exists which has the same bean initializer methods defined by annotations</text>
+ </assertion>
+ <assertion id="bc">
+ <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such simple bean, a second simple bean exists which has the same defined by annotations</text>
+ </assertion>
<assertion id="c">
<text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
Additionally, for each such simple bean, a second simple bean exists which has the same interceptor bindings defined by annotations</text>
@@ -834,8 +845,20 @@
</assertion>
<assertion id="i">
<text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such simple bean, a second simple bean exists which has no observer methods, producer methods or fields or disposal methods</text>
+Additionally, for each such simple bean, a second simple bean exists which has no observer methods</text>
</assertion>
+ <assertion id="j">
+ <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such simple bean, a second simple bean exists which has no producer methods</text>
+ </assertion>
+ <assertion id="k">
+ <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such simple bean, a second simple bean exists which has no producer fields</text>
+ <assertion id="l">
+ <text>Every class that satisfies the requirements of Section 3.2.1, "Which Java classes are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
+Additionally, for each such simple bean, a second simple bean exists which has no disposal methods</text>
+ </assertion>
+ </assertion>
</section>
<section id="3.2.6" title="Bean constructors">
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1590 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/producer/method.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-02-18 20:03:15 -0500 (Wed, 18 Feb 2009)
New Revision: 1590
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/producer/method/ProducerMethodSpecializationTest.java
Log:
mapped specialization tests
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/producer/method/ProducerMethodSpecializationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/producer/method/ProducerMethodSpecializationTest.java 2009-02-19 00:38:53 UTC (rev 1589)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/producer/method/ProducerMethodSpecializationTest.java 2009-02-19 01:03:15 UTC (rev 1590)
@@ -35,8 +35,8 @@
@Test
@SpecAssertions({
- @SpecAssertion(section = "4.3.1", id = "unknown"),
- @SpecAssertion(section = "3.4.5", id = "unknown")
+ @SpecAssertion(section = "4.3.1", id = "c"),
+ @SpecAssertion(section = "3.4.5", id = "a")
})
public void testSpecializingBeanHasBindingsOfSpecializedAndSpecializingBean()
{
@@ -48,8 +48,8 @@
@Test
@SpecAssertions({
- @SpecAssertion(section = "4.3.1", id = "unknown"),
- @SpecAssertion(section = "3.4.5", id = "unknown")
+ @SpecAssertion(section = "4.3.1", id = "d"),
+ @SpecAssertion(section = "3.4.5", id = "a")
})
public void testSpecializingBeanHasNameOfSpecializedBean()
{
@@ -59,7 +59,7 @@
}
@Test(expectedExceptions=DefinitionException.class)
- @SpecAssertion(section = "4.3.1", id = "unknown")
+ @SpecAssertion(section = "4.3.1", id = "d")
public void testSpecializingAndSpecializedBeanHasName()
{
deployBeans(HighSchool_Broken.class);
@@ -67,8 +67,8 @@
@Test
@SpecAssertions({
- @SpecAssertion(section = "4.3.1", id = "unknown"),
- @SpecAssertion(section = "3.4.5", id = "unknown")
+ @SpecAssertion(section = "4.3.1", id = "f"),
+ @SpecAssertion(section = "3.4.5", id = "a")
})
public void testSpecializedBeanNotInstantiated() throws Exception
{
@@ -87,35 +87,35 @@
}
@Test(expectedExceptions=InconsistentSpecializationException.class)
- @SpecAssertion(section="4.3.1", id = "unknown")
+ @SpecAssertion(section="4.3.1", id = "a")
public void testSpecializingBeanDoesNotHaveHigherPrecedenceThanSpecializedBean()
{
deployBeans(ClothesShop_Broken.class);
}
@Test(expectedExceptions=InconsistentSpecializationException.class)
- @SpecAssertion(section="4.3.1", id = "unknown")
+ @SpecAssertion(section="4.3.1", id = "review")
public void testTwoBeansSpecializeTheSameBean()
{
deployBeans(PictureShop_Broken.class, Bookshop_Broken.class);
}
@Test(expectedExceptions=DefinitionException.class)
- @SpecAssertion(section="3.4.5", id = "unknown")
+ @SpecAssertion(section="3.4.5", id = "b")
public void testSpecializedStaticMethod()
{
deployBeans(FurnitureShop_Broken.class);
}
@Test(expectedExceptions=DefinitionException.class)
- @SpecAssertion(section="3.4.5", id = "unknown")
+ @SpecAssertion(section="3.4.5", id = "c")
public void testSpecializedMethodDoesNotOverrideAnotherProducerMethod()
{
deployBeans(FurnitureShop_Broken.class);
}
@Test(expectedExceptions=DefinitionException.class)
- @SpecAssertion(section="3.4.5", id = "unknown")
+ @SpecAssertion(section="3.4.5", id = "c")
public void testSpecializedMethodIndirectlyOverridesAnotherProducerMethod()
{
deployBeans(ShoeShop_Broken.class);
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1589 - in tck/trunk/impl/src/main: resources and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-18 19:38:53 -0500 (Wed, 18 Feb 2009)
New Revision: 1589
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
A few more mappings
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java 2009-02-19 00:19:31 UTC (rev 1588)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java 2009-02-19 00:38:53 UTC (rev 1589)
@@ -135,42 +135,42 @@
}
@Test(expectedExceptions = DefinitionException.class, groups = { "stub", "webbeansxml" })
- @SpecAssertion(section = "3.2.4", id = "unknown")
+ @SpecAssertion(section = "3.2.4", id = "e")
public void testAbstractClassDeclaredInXmlIsNotAllowed()
{
}
@Test(groups = { "stub", "innerClass", "webbeansxml" })
- @SpecAssertion(section = "3.2.4", id = "unknown")
+ @SpecAssertion(section = "3.2.4", id = "da")
public void testStaticInnerClassDeclaredInXmlAllowed()
{
assert false;
}
@Test(expectedExceptions = DefinitionException.class, groups = { "stub", "innerClass", "webbeansxml" })
- @SpecAssertion(section = "3.2.4", id = "unknown")
+ @SpecAssertion(section = "3.2.4", id = "d")
public void testNonStaticInnerClassDeclaredInXmlNotAllowed()
{
assert false;
}
@Test(expectedExceptions = DefinitionException.class, groups = { "stub", "webbeansxml" })
- @SpecAssertion(section = "3.2.4", id = "unknown")
+ @SpecAssertion(section = "3.2.4", id = "c")
public void testParameterizedClassDeclaredInXmlIsNotAllowed()
{
assert false;
}
@Test(expectedExceptions = DefinitionException.class, groups = { "stub", "interceptors", "webbeansxml" })
- @SpecAssertion(section = "3.2.4", id = "unknown")
+ @SpecAssertion(section = "3.2.4", id = "f")
public void testClassHasInterceptorInJavaMustHaveInterceptorInXml()
{
assert false;
}
@Test(expectedExceptions = DefinitionException.class, groups = { "stub", "interceptors", "webbeansxml" })
- @SpecAssertion(section = "3.2.4", id = "unknown")
+ @SpecAssertion(section = "3.2.4", id = "g")
public void testClassHasDecoratorInJavaMustHaveDecoratorInXml()
{
assert false;
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 00:19:31 UTC (rev 1588)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 00:38:53 UTC (rev 1589)
@@ -685,6 +685,9 @@
<assertion id="b">
<text>A top-level Java class is not a simple bean if it is a non-static inner class</text>
</assertion>
+ <assertion id="ba">
+ <text>A top-level Java class that is a static inner class can be a simple bean</text>
+ </assertion>
<assertion id="ca">
<text>A top-level Java class is not a simple bean if it is an abstract class</text>
</assertion>
@@ -776,6 +779,10 @@
<text>If the bean class of a simple bean defined in XML is a non-static inner class, a DefinitionException is thrown by the container at deployment time.</text>
</assertion>
+ <assertion id="da">
+ <text>If the bean class of a simple bean defined in XML is a static inner class, a DefinitionException is not thrown.</text>
+ </assertion>
+
<assertion id="e">
<text>If the bean class of a simple bean defined in XML is an abstract class, and the simple bean is not a decorator, a DefinitionException
is thrown by the container at deployment time</text>
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1588 - in tck/trunk/impl/src/main: resources and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-02-18 19:19:31 -0500 (Wed, 18 Feb 2009)
New Revision: 1588
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/deployment/BeanDeploymentTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
mapped bean deployment tests to assertions
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/deployment/BeanDeploymentTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/deployment/BeanDeploymentTest.java 2009-02-19 00:16:20 UTC (rev 1587)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/deployment/BeanDeploymentTest.java 2009-02-19 00:19:31 UTC (rev 1588)
@@ -10,98 +10,112 @@
*/
public class BeanDeploymentTest
{
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.2.7", id = "unknown")
+ @Test(groups={"stub", "specialization"})
+ @SpecAssertion(section="3.2.7", id = "b")
public void testOnlySpecializedSimpleBeanDeployed()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.2.7", id = "unknown")
+ @Test(groups={"stub", "specialization"})
+ @SpecAssertion(section="3.2.7", id = "a")
public void testSpecializedSimpleBeanExtends()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.2.7", id = "unknown")
+ @Test(groups={"stub", "specialization"})
+ @SpecAssertion(section="3.2.7", id = "e")
public void testSpecializedSimpleBeanHasSameBindingAnnotations()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.2.7", id = "unknown")
+ @Test(groups={"stub", "specialization"})
+ @SpecAssertion(section="3.2.7", id = "e")
public void testSpecializedSimpleBeanHasSameName()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.7", id = "unknown")
+ @Test(groups={"stub", "specialization"})
+ @SpecAssertion(section="3.3.7", id = "b")
public void testOnlySpecializedEnterpriseBeanDeployed()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.7", id = "unknown")
+ @Test(groups={"stub", "specialization"})
+ @SpecAssertion(section="3.3.7", id = "a")
public void testSpecializedEnterpriseBeanExtends()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.7", id = "unknown")
+ @Test(groups={"stub", "specialization"})
+ @SpecAssertion(section="3.3.7", id = "a")
public void testSpecializedEnterpriseBeanHasSameBindingAnnotations()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.7", id = "unknown")
+ @Test(groups={"stub", "specialization"})
+ @SpecAssertion(section="3.3.7", id = "a")
public void testSpecializedEnterpriseBeanHasSameName()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.7", id = "unknown")
+ @Test(groups={"stub", "specialization"})
+ @SpecAssertion(section="3.3.7", id = "a")
public void testSpecializedEnterpriseBeanAllLocalInterfaces()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.7", id = "unknown")
+ @Test(groups={"stub", "specialization"})
+ @SpecAssertion(section="3.3.7", id = "a")
public void testSpecializedEnterpriseBeanSupportsBeanClassLocalView()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.4", id = "unknown")
+ @Test(groups={"stub", "specialization"})
+ @SpecAssertion(section="3.3.4", id = "review")
public void testOnlySpecializedProducerMethodBeanDeployed()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.4", id = "unknown")
+ @Test(groups={"stub", "specialization"})
+ @SpecAssertion(section="3.3.4", id = "review")
public void testSpecializedProducerMethodBeanDirectlyOverrides()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.4", id = "unknown")
+ @Test(groups={"stub", "specialization"})
+ @SpecAssertion(section="3.3.4", id = "review")
public void testSpecializedProducerMethodBeanHasSameBindingAnnotations()
{
// TODO Placeholder
assert false;
}
- @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.4", id = "unknown")
+ @Test(groups={"stub", "specialization"})
+ @SpecAssertion(section="3.3.4", id = "review")
public void testSpecializedProducerMethodBeanHasSameName()
{
// TODO Placeholder
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 00:16:20 UTC (rev 1587)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 00:19:31 UTC (rev 1588)
@@ -88,6 +88,10 @@
</assertion>
</section>
+
+ <section id="2.3" title="Bindings">
+
+ </section>
<section id="2.3.1" title="Default binding type">
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1587 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean and 2 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-18 19:16:20 -0500 (Wed, 18 Feb 2009)
New Revision: 1587
Modified:
ri/trunk/jboss-tck-runner/pom.xml
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
tck/trunk/impl/pom.xml
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/PomeranianInterface.java
Log:
Fix enterprisebean, mark some event tests as broken, add ability to dump artifacts from the runner with the portingpackge in place
Modified: ri/trunk/jboss-tck-runner/pom.xml
===================================================================
--- ri/trunk/jboss-tck-runner/pom.xml 2009-02-19 00:07:01 UTC (rev 1586)
+++ ri/trunk/jboss-tck-runner/pom.xml 2009-02-19 00:16:20 UTC (rev 1587)
@@ -35,14 +35,12 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <scope>test</scope>
<classifier>jdk15</classifier>
</dependency>
<dependency>
<groupId>org.jboss.jsr299.tck</groupId>
<artifactId>jsr299-tck-impl</artifactId>
- <scope>test</scope>
</dependency>
<dependency>
@@ -203,6 +201,41 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>write-artifacts-to-disk</id>
+ <activation>
+ <property>
+ <name>dumpArtifacts</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>package</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <java classname="org.jboss.jsr299.tck.api.TCK" classpathref="maven.compile.classpath" failonerror="true" fork="true">
+ <jvmarg line="-DdumpArtifacts=true"/>
+ <jvmarg line="-Dorg.jboss.jsr299.tck.outputDirectory=target/jsr299-artifacts" />
+ <jvmarg line="-Dorg.jboss.jsr299.tck.libraryDirectory=target/dependency/lib" />
+ </java>
+ <echo>Dumped artifacts to ${basedir}/target/jsr299-artifacts</echo>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2009-02-19 00:07:01 UTC (rev 1586)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2009-02-19 00:16:20 UTC (rev 1587)
@@ -17,7 +17,9 @@
package org.jboss.webbeans.bean;
+import java.lang.reflect.Method;
import java.lang.reflect.Type;
+import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.Set;
@@ -26,7 +28,6 @@
import javax.context.ApplicationScoped;
import javax.context.CreationalContext;
-import javax.context.Dependent;
import javax.decorator.Decorator;
import javax.event.Observes;
import javax.inject.CreationException;
@@ -340,11 +341,31 @@
{
if (!method.isStatic())
{
- if (!this.getTypes().contains(method.getMember().getDeclaringClass()))
+ if (!isMethodExistsOnTypes(method))
{
- throw new DefinitionException("Observer method must be static or business method: " + method);
+ throw new DefinitionException("Observer method must be static or business method: " + method + " on " + getAnnotatedItem());
}
}
}
}
+
+ // TODO must be a nicer way to do this!
+ public boolean isMethodExistsOnTypes(AnnotatedMethod<?> method)
+ {
+ for (Type type : getTypes())
+ {
+ if (type instanceof Class)
+ {
+ for (Method m : ((Class<?>) type).getMethods())
+ {
+ if (method.getName().equals(m.getName()) && Arrays.equals(method.getParameterTypesAsArray(), m.getParameterTypes()))
+ {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
}
+
Modified: tck/trunk/impl/pom.xml
===================================================================
--- tck/trunk/impl/pom.xml 2009-02-19 00:07:01 UTC (rev 1586)
+++ tck/trunk/impl/pom.xml 2009-02-19 00:16:20 UTC (rev 1587)
@@ -211,9 +211,10 @@
</plugin>
</plugins>
+ <defaultGoal>compile</defaultGoal>
</build>
</profile>
- <profile>
+ <profile>
<id>write-artifacts-to-disk</id>
<activation>
<property>
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java 2009-02-19 00:07:01 UTC (rev 1586)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java 2009-02-19 00:16:20 UTC (rev 1587)
@@ -19,9 +19,11 @@
import static org.jboss.jsr299.tck.impl.packaging.PackagingType.EAR;
+import java.lang.annotation.Annotation;
import java.util.Set;
import javax.event.Observer;
+import javax.inject.AnnotationLiteral;
import javax.inject.manager.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
@@ -44,6 +46,9 @@
@IntegrationTest
public class EventTest extends AbstractDeclarativeTest
{
+
+ private static final Annotation TAME_LITERAL = new AnnotationLiteral<Tame>() {};
+
@Test(groups = { "stub", "events", "integration" })
@SpecAssertion(section = "7.4", id = "unknown")
public void testObserverCalledBeforeTransactionCompleteMaySetRollbackOnly()
@@ -58,7 +63,7 @@
assert false;
}
- @Test(groups = { "events", "integration" })
+ @Test(groups = { "events", "integration", "broken" })
@SpecAssertion(section = "7.5.6", id = "unknown")
public void testTransactionalObserverNotifiedImmediatelyWhenNoTransactionInProgress()
{
@@ -83,7 +88,7 @@
dogAgent.sendInTransaction(new Integer(4));
}
- @Test(groups = { "events", "integration" })
+ @Test(groups = { "events", "integration", "broken" })
@SpecAssertion(section = "7.5.6", id = "unknown")
public void testAfterTransactionFailureObserver()
{
@@ -126,11 +131,11 @@
/**
*
*/
- @Test(groups = { "events", "integration" })
+ @Test(groups = { "events", "integration", "broken" })
@SpecAssertion(section = "7.5.8", id = "unknown")
public void testEnterpriseBeanObserverMethodCalledWithCallerContext()
{
- Set<Bean<PomeranianInterface>> beans = getCurrentManager().resolveByType(PomeranianInterface.class);
+ Set<Bean<PomeranianInterface>> beans = getCurrentManager().resolveByType(PomeranianInterface.class, TAME_LITERAL);
assert !beans.isEmpty();
String event = "A new event";
Set<Observer<String>> observers = getCurrentManager().resolveObservers(event);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/PomeranianInterface.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/PomeranianInterface.java 2009-02-19 00:07:01 UTC (rev 1586)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/PomeranianInterface.java 2009-02-19 00:16:20 UTC (rev 1587)
@@ -2,11 +2,6 @@
import java.math.BigInteger;
-import javax.event.AfterTransactionCompletion;
-import javax.event.AfterTransactionFailure;
-import javax.event.AfterTransactionSuccess;
-import javax.event.Observes;
-
public interface PomeranianInterface
{
/**
@@ -14,23 +9,23 @@
*
* @param someEvent
*/
- public void observeStringEvent(@Observes @AfterTransactionCompletion String someEvent);
+ public void observeStringEvent(String someEvent);
/**
* Observes an Integer event if the transaction is successfully completed.
*
* @param event
*/
- public void observeIntegerEvent(@Observes @AfterTransactionSuccess Integer event);
+ public void observeIntegerEvent(Integer event);
/**
* Observes a Float event only if the transaction failed.
*
* @param event
*/
- public void observeFloatEvent(@Observes @AfterTransactionFailure Float event);
+ public void observeFloatEvent(Float event);
- public void observeBigIntegerEvent(@Observes BigInteger event);
+ public void observeBigIntegerEvent(BigInteger event);
public boolean isCorrectContext();
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1586 - in tck/trunk/impl/src/main: resources and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-02-18 19:07:01 -0500 (Wed, 18 Feb 2009)
New Revision: 1586
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/NewEnterpriseBeanTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
mapped new enterprise bean tests to assertions
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/NewEnterpriseBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/NewEnterpriseBeanTest.java 2009-02-19 00:04:19 UTC (rev 1585)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/NewEnterpriseBeanTest.java 2009-02-19 00:07:01 UTC (rev 1586)
@@ -36,79 +36,37 @@
newEnterpriseBean = beans.iterator().next();
}
- /**
- * When the built-in binding type @New is applied to an injection point, a
- * Web Bean is implicitly defined with: � scope @Dependent, � deployment type
- *
- * @Standard, � @New as the only binding annotation, � no Web Bean name, � no
- * stereotypes, and such that � the implementation class is the
- * declared type of the injection point.
- */
@Test(groups = { "new" })
- @SpecAssertion(section = "3.3.6", id = "unknown")
+ @SpecAssertion(section = "3.3.6", id = "d")
public void testNewBeanIsDependentScoped()
{
assert Dependent.class.equals(newEnterpriseBean.getScopeType());
}
- /**
- * When the built-in binding type @New is applied to an injection point, a
- * Web Bean is implicitly defined with: � scope @Dependent, � deployment type
- *
- * @Standard, � @New as the only binding annotation, � no Web Bean name, � no
- * stereotypes, and such that � the implementation class is the
- * declared type of the injection point.
- */
@Test(groups = { "new" })
- @SpecAssertion(section = "3.3.6", id = "unknown")
+ @SpecAssertion(section = "3.3.6", id = "e")
public void testNewBeanIsOfStandardDeploymentType()
{
assert Standard.class.equals(newEnterpriseBean.getDeploymentType());
}
- /**
- * When the built-in binding type @New is applied to an injection point, a
- * Web Bean is implicitly defined with: � scope @Dependent, � deployment type
- *
- * @Standard, � @New as the only binding annotation, � no Web Bean name, � no
- * stereotypes, and such that � the implementation class is the
- * declared type of the injection point.
- */
@Test(groups = { "new" })
- @SpecAssertion(section = "3.3.6", id = "unknown")
+ @SpecAssertion(section = "3.3.6", id = "f")
public void testNewBeanIsHasOnlyNewBinding()
{
assert newEnterpriseBean.getBindings().size() == 1;
assert newEnterpriseBean.getBindings().iterator().next().annotationType().equals(new NewLiteral().annotationType());
}
- /**
- * When the built-in binding type @New is applied to an injection point, a
- * Web Bean is implicitly defined with: � scope @Dependent, � deployment type
- *
- * @Standard, � @New as the only binding annotation, � no Web Bean name, � no
- * stereotypes, and such that � the implementation class is the
- * declared type of the injection point.
- */
@Test(groups = { "new" })
- @SpecAssertion(section = "3.3.6", id = "unknown")
+ @SpecAssertion(section = "3.3.6", id = "g")
public void testNewBeanHasNoWebBeanName()
{
assert newEnterpriseBean.getName() == null;
}
- /**
- * When the built-in binding type @New is applied to an injection point, a
- * Web Bean is implicitly defined with: � scope @Dependent, � deployment type
- *
- * @Standard, � @New as the only binding annotation, � no Web Bean name, � no
- * stereotypes, and such that � the implementation class is the
- * declared type of the injection point.
- *
- * TODO It is difficult to prove if a bean has any stereotypes
- */
@Test(groups = { "stub", "new", "underInvestigation" })
- @SpecAssertion(section = "3.3.6", id = "unknown")
+ @SpecAssertion(section = "3.3.6", id = "h")
public void testNewBeanHasNoStereotypes()
{
assert false;
@@ -123,7 +81,7 @@
* is an enterprise Web Bean.
*/
@Test(groups = { "new", "stub", "ejb3" })
- @SpecAssertion(section = "3.3.6", id = "unknown")
+ @SpecAssertion(section = "3.3.6", id = "review")
public void testNewBeanIsEnterpriseWebBeanIfParameterTypeIsEnterpriseWebBean()
{
assert false;
@@ -163,17 +121,6 @@
// assert false;
// }
- /**
- * Furthermore, this Web Bean: � has the same Web Bean constructor,
- * initializer methods and injected fields as a Web Bean defined using
- * annotations� that is, it has any Web Bean constructor, initializer method
- * or injected field declared by annotations that appear on the
- * implementation class, � has no observer methods, producer methods or
- * fields or disposal methods, � has the same interceptors as a Web Bean
- * defined using annotations�that is, it has all the interceptor binding
- * types declared by annotations that appear on the implementation class, and
- * � has no decorators.
- */
@Test(groups = {"new" })
@SpecAssertion(section = "3.3.6", id = "i")
public void testNewBeanHasNoObservers()
@@ -183,19 +130,6 @@
assert getCurrentManager().resolveObservers("event").size() == 1;
}
- /**
- * Furthermore, this Web Bean: � has the same Web Bean constructor,
- * initializer methods and injected fields as a Web Bean defined using
- * annotations� that is, it has any Web Bean constructor, initializer method
- * or injected field declared by annotations that appear on the
- * implementation class, � has no observer methods, producer methods or
- * fields or disposal methods, � has the same interceptors as a Web Bean
- * defined using annotations�that is, it has all the interceptor binding
- * types declared by annotations that appear on the implementation class, and
- * � has no decorators.
- *
- * TODO There is no way to prove that a new bean has no producer fields
- */
@Test(groups = { "new", "stub", "underInvestigation" })
@SpecAssertion(section = "3.3.6", id = "k")
public void testNewBeanHasNoProducerFields()
@@ -204,56 +138,25 @@
}
/**
- * Furthermore, this Web Bean: � has the same Web Bean constructor,
- * initializer methods and injected fields as a Web Bean defined using
- * annotations� that is, it has any Web Bean constructor, initializer method
- * or injected field declared by annotations that appear on the
- * implementation class, � has no observer methods, producer methods or
- * fields or disposal methods, � has the same interceptors as a Web Bean
- * defined using annotations�that is, it has all the interceptor binding
- * types declared by annotations that appear on the implementation class, and
- * � has no decorators.
*
* TODO There really is no way to prove that a @New bean has no producers
*/
@Test(groups = { "new", "stub", "underInvestigation" })
- @SpecAssertion(section = "3.3.6", id = "unknown")
+ @SpecAssertion(section = "3.3.6", id = "j")
public void testNewBeanHasNoProducerMethods()
{
assert false;
}
- /**
- * Furthermore, this Web Bean: � has the same Web Bean constructor,
- * initializer methods and injected fields as a Web Bean defined using
- * annotations� that is, it has any Web Bean constructor, initializer method
- * or injected field declared by annotations that appear on the
- * implementation class, � has no observer methods, producer methods or
- * fields or disposal methods, � has the same interceptors as a Web Bean
- * defined using annotations�that is, it has all the interceptor binding
- * types declared by annotations that appear on the implementation class, and
- * � has no decorators.
- */
@Test(groups = { "new", "stub", "disposal" })
- @SpecAssertion(section = "3.3.6", id = "unknown")
+ @SpecAssertion(section = "3.3.6", id = "l")
public void testNewBeanHasNoDisposalMethods()
{
assert false;
}
- /**
- * Furthermore, this Web Bean: � has the same Web Bean constructor,
- * initializer methods and injected fields as a Web Bean defined using
- * annotations� that is, it has any Web Bean constructor, initializer method
- * or injected field declared by annotations that appear on the
- * implementation class, � has no observer methods, producer methods or
- * fields or disposal methods, � has the same interceptors as a Web Bean
- * defined using annotations�that is, it has all the interceptor binding
- * types declared by annotations that appear on the implementation class, and
- * � has no decorators.
- */
@Test(groups = { "stub", "new", "interceptors" })
- @SpecAssertion(section = "3.3.6", id = "unknown")
+ @SpecAssertion(section = "3.3.6", id = "c")
public void testNewBeanHasSameInterceptorMethodsAsWrappedBean()
{
assert false;
@@ -271,7 +174,7 @@
* � has no decorators.
*/
@Test(groups = { "new", "broken" })
- @SpecAssertion(section = "3.3.6", id = "unknown")
+ @SpecAssertion(section = "3.3.6", id = "review")
public void testNewBeanHasNoDecorators()
{
Annotation[] bindingTypes = newEnterpriseBean.getBindings().toArray(new Annotation[0]);
@@ -287,7 +190,7 @@
* Bean implementation class.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.3.6", id = "unknown")
+ @SpecAssertion(section = "3.3.6", id = "review")
public void testNewAnnotationMayBeAppliedToField()
{
deployBeans(AnnotatedField.class, WrappedEnterpriseBean.class);
@@ -303,7 +206,7 @@
* Bean implementation class.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.3.6", id = "unknown")
+ @SpecAssertion(section = "3.3.6", id = "review")
public void testNewAnnotationMayBeAppliedToProducerMethodParameter()
{
deployBeans(AnnotatedProducerParameter.class, WrappedEnterpriseBean.class);
@@ -319,7 +222,7 @@
* Bean implementation class.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.3.6", id = "unknown")
+ @SpecAssertion(section = "3.3.6", id = "review")
public void testNewAnnotationMayBeAppliedToInitializerMethodParameter()
{
deployBeans(AnnotatedInitializerParameter.class, WrappedEnterpriseBean.class);
@@ -335,7 +238,7 @@
* Bean implementation class.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.3.6", id = "unknown")
+ @SpecAssertion(section = "3.3.6", id = "review")
public void testNewAnnotationMayBeAppliedToConstructorMethodParameter()
{
deployBeans(AnnotatedConstructorParameter.class, WrappedEnterpriseBean.class);
@@ -350,7 +253,7 @@
* by the container at deployment time.
*/
@Test(groups = { "new" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3.6", id = "unknown")
+ @SpecAssertion(section = "3.3.6", id = "review")
public void testNewAnnotationCannotAppearInConjunctionWithOtherBindingType()
{
deployBeans(NewAndOtherBindingType_Broken.class);
@@ -374,7 +277,7 @@
* as a binding type
*/
@Test(groups = { "stub", "new", "webbeansxml" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3.6", id = "unknown")
+ @SpecAssertion(section = "3.3.6", id = "review")
public void testNewAnnotationCannotBeExplicitlyDeclared()
{
// This only needs to be tested with XML since the annotation itself
@@ -382,7 +285,7 @@
assert false;
}
- @Test @SpecAssertion(section="3.2.6", id = "unknown")
+ @Test @SpecAssertion(section="3.2.6", id = "review")
public void testForEachEnterpriseBeanANewBeanExists()
{
deployBeans(Order.class, Lion.class);
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 00:04:19 UTC (rev 1585)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 00:07:01 UTC (rev 1586)
@@ -831,6 +831,7 @@
<assertion id="a">
<text>When the container instantiates a simple bean, it calls the bean constructor. The bean constructor is a constructor of the bean class</text>
</assertion>
+
<assertion id="b">
<text>The application may call bean constructors directly. However, if the application directly instantiates the bean, no parameters are passed to the constructor by the container; the returned object is not bound to any context; no dependencies are injected by the container; and the lifecycle of the new instance is not managed by the container</text>
</assertion>
@@ -1029,72 +1030,58 @@
<section id="3.3.6" title="Session beans with the @New binding">
<assertion id="a">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has the same bean class</text>
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has the same bean class</text>
</assertion>
<assertion id="b">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has the initializer methods and injected fields defined by annotations</text>
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has the initializer methods and injected fields defined by annotations</text>
</assertion>
<assertion id="c">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has the same interceptor bindings defined by annotations</text>
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has the same interceptor bindings defined by annotations</text>
</assertion>
<assertion id="d">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has scope @Dependent,</text>
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has scope @Dependent,</text>
</assertion>
<assertion id="e">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has deployment type @Standard</text>
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has deployment type @Standard</text>
</assertion>
<assertion id="f">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has @javax.inject.New as the only binding</text>
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has @javax.inject.New as the only binding</text>
</assertion>
<assertion id="g">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has no bean name</text>
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has no bean name</text>
</assertion>
<assertion id="h">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has no stereotypes</text>
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has no stereotypes</text>
</assertion>
<assertion id="i">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has no observer methods</text>
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has no observer methods</text>
</assertion>
<assertion id="j">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has no producer methods</text>
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has no producer methods</text>
</assertion>
<assertion id="k">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has no producer fields</text>
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has no producer fields</text>
</assertion>
<assertion id="l">
- <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations.
-Additionally, for each such session bean, a second bean exists which has no disposal methods</text>
+ <text>Every EJB that satisfies the requirements of Section 3.3.2, "Which EJBs are beans?" is a bean, with scope, deployment type and bindings defined using annotations. Additionally, for each such session bean, a second bean exists which has no disposal methods</text>
</assertion>
</section>
<section id="3.3.7" title="Specializing a session bean">
<assertion id="a">
- <text>If a bean class of a session bean X defined using annotations is annotated @Specializes, then the bean class of X must directly extend the bean class of another session bean Y defined using annotations. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y. Also, X must support all local interfaces supported by Y, and
-if Y supports a bean-class local view, X must also support a bean-class local view.
-Otherwise, a DefinitionException is thrown by the container at deployment time.</text>
+ <text>If a bean class of a session bean X defined using annotations is annotated @Specializes, then the bean class of X must directly extend the bean class of another session bean Y defined using annotations. Then X inherits all bindings of Y, and if Y has a name, X has the same name as Y. Also, X must support all local interfaces supported by Y, and if Y supports a bean-class local view, X must also support a bean-class local view. Otherwise, a DefinitionException is thrown by the container at deployment time.</text>
</assertion>
<assertion id="b">
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1585 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-18 19:04:19 -0500 (Wed, 18 Feb 2009)
New Revision: 1585
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java
Log:
Match 3.2.1
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java 2009-02-18 23:57:27 UTC (rev 1584)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java 2009-02-19 00:04:19 UTC (rev 1585)
@@ -7,6 +7,7 @@
import javax.inject.manager.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.jboss.jsr299.tck.impl.util.MockCreationalContext;
import org.jboss.jsr299.tck.unit.implementation.simple.OuterBean_Broken.InnerBean_Broken;
@@ -32,21 +33,21 @@
// *** BEAN CLASS CHECKS ****//
@Test(expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.2", id = "unknown")
+ @SpecAssertion(section = "3.2.1", id = "ca")
public void testAbstractClassDeclaredInJavaIsNotAllowed()
{
createSimpleBean(Cow_Broken.class);
}
@Test(groups = "innerClass")
- @SpecAssertion(section = "3.2", id = "unknown")
+ @SpecAssertion(section = "3.2.1", id = "cc")
public void testStaticInnerClassDeclaredInJavaAllowed()
{
createSimpleBean(StaticInnerBean_Broken.class);
}
@Test(expectedExceptions = DefinitionException.class, groups = "innerClass")
- @SpecAssertion(section = "3.2", id = "unknown")
+ @SpecAssertion(section = "3.2.1", id = "b")
public void testNonStaticInnerClassDeclaredInJavaNotAllowed()
{
createSimpleBean(InnerBean_Broken.class);
@@ -54,14 +55,14 @@
@SuppressWarnings("unchecked")
@Test(expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.2", id = "unknown")
+ @SpecAssertion(section = "3.2.1", id = "a")
public void testParameterizedClassDeclaredInJavaIsNotAllowed()
{
createSimpleBean(ParameterizedBean_Broken.class);
}
@Test(expectedExceptions = DefinitionException.class, groups = { "stub", "interceptors", "decorators" })
- @SpecAssertion(section = "3.2", id = "unknown")
+ @SpecAssertion(section = "3.2.1", id = "unknown")
public void testClassCannotBeInterceptorAndDecorator()
{
@@ -74,6 +75,12 @@
// }
@Test
+ @SpecAssertions( {
+ @SpecAssertion(section = "3.2.1", id = "g"),
+ @SpecAssertion(section = "3.2.1", id = "h"),
+ @SpecAssertion(section = "3.2.1", id = "i"),
+ @SpecAssertion(section = "3.2.1", id = "j"),
+ @SpecAssertion(section = "3.2.1", id = "k")})
public void testClassesImplementingServletInterfacesNotDiscoveredAsSimpleBeans()
{
deployBeans(MockFilter.class, MockHttpSessionListener.class, MockServlet.class, MockServletContextListener.class, MockServletRequestListener.class);
@@ -85,6 +92,7 @@
}
@Test
+ @SpecAssertion(section="3.2.1", id="l")
public void testClassesImplementingEnterpriseBeanInterfaceNotDiscoveredAsSimpleBean()
{
deployBeans(MockEnterpriseBean.class);
@@ -92,6 +100,7 @@
}
@Test
+ @SpecAssertion(section="3.2.1", id="m")
public void testClassExtendingUiComponentNotDiscoveredAsSimpleBean()
{
deployBeans(MockUIComponent.class);
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1584 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-02-18 18:57:27 -0500 (Wed, 18 Feb 2009)
New Revision: 1584
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/EnterpriseBeanDeclarationTest.java
Log:
mapped enterprise bean tests to assertions
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/EnterpriseBeanDeclarationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/EnterpriseBeanDeclarationTest.java 2009-02-18 23:44:50 UTC (rev 1583)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/EnterpriseBeanDeclarationTest.java 2009-02-18 23:57:27 UTC (rev 1584)
@@ -7,171 +7,93 @@
import org.testng.annotations.Test;
/**
- * Sections
- *
- * 3.3. Enterprise Web Beans 3.3.1. Which EJBs are enterprise Web Beans? 3.3.2.
- * API types of an enterprise Web Bean 3.3.3. Declaring an enterprise Web Bean
- * using annotations 3.3.4. Declaring an enterprise Web Bean using XML
- *
* @author Nicklas Karlsson
*
* Spec version: PRD2
*/
public class EnterpriseBeanDeclarationTest extends AbstractDeclarativeTest
{
-
- /**
- * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
- * If an enterprise Web Bean specifies an illegal scope, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time
- */
@Test(groups = { "enterpriseBeans" })
- @SpecAssertion(section = "3.3", id = "unknown")
+ @SpecAssertion(section = "3.3", id = "b")
public void testStatelessWithDependentScopeOK()
{
deployBeans(Giraffe.class);
}
- /**
- * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
- * If an enterprise Web Bean specifies an illegal scope, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time
- */
@Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3", id = "unknown")
+ @SpecAssertion(section = "3.3", id = "d")
public void testStatelessWithRequestScopeFails()
{
deployBeans(Beagle_Broken.class);
}
- /**
- * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
- * If an enterprise Web Bean specifies an illegal scope, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time
- */
-
@Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3", id = "unknown")
+ @SpecAssertion(section = "3.3", id = "d")
public void testStatelessWithConversationScopeFails()
{
deployBeans(Boxer_Broken.class);
}
- /**
- * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
- * If an enterprise Web Bean specifies an illegal scope, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time
- */
@Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3", id = "unknown")
+ @SpecAssertion(section = "3.3", id = "d")
public void testStatelessWithSessionScopeFails()
{
deployBeans(Bullmastiff_Broken.class);
}
- /**
- * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
- * If an enterprise Web Bean specifies an illegal scope, a
- * DefinitionException is thrown by the Web Bean manager at initialization
- * time
- */
@Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3", id = "unknown")
+ @SpecAssertion(section = "3.3", id = "d")
public void testStatelessWithApplicationScopeFails()
{
deployBeans(Dachshund_Broken.class);
}
- /**
- * An EJB singleton bean must belong to either the @ApplicationScoped scope
- * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
- * illegal scope, a DefinitionException is thrown by the Web Bean manager at
- * initialization time
- */
@Test(groups = { "enterpriseBeans" })
- @SpecAssertion(section = "3.3", id = "unknown")
+ @SpecAssertion(section = "3.3", id = "c")
public void testSingletonWithDependentScopeOK()
{
deployBeans(Labrador.class);
}
- /**
- * An EJB singleton bean must belong to either the @ApplicationScoped scope
- * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
- * illegal scope, a DefinitionException is thrown by the Web Bean manager at
- * initialization time
- */
@Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3", id = "unknown")
+ @SpecAssertion(section = "3.3", id = "d")
public void testSingletonWithRequestScopeFails()
{
deployBeans(Greyhound_Broken.class);
assert false;
}
- /**
- * An EJB singleton bean must belong to either the @ApplicationScoped scope
- * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
- * illegal scope, a DefinitionException is thrown by the Web Bean manager at
- * initialization time
- */
@Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3", id = "unknown")
+ @SpecAssertion(section = "3.3", id = "d")
public void testSingletonWithConversationScopeFails()
{
deployBeans(Husky_Broken.class);
assert false;
}
- /**
- * An EJB singleton bean must belong to either the @ApplicationScoped scope
- * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
- * illegal scope, a DefinitionException is thrown by the Web Bean manager at
- * initialization time
- */
@Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3", id = "unknown")
+ @SpecAssertion(section = "3.3", id = "")
public void testSingletonWithSessionScopeFails()
{
deployBeans(IrishTerrier_Broken.class);
}
- /**
- * An EJB singleton bean must belong to either the @ApplicationScoped scope
- * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
- * illegal scope, a DefinitionException is thrown by the Web Bean manager at
- * initialization time
- */
@Test(groups = { "enterpriseBeans" })
- @SpecAssertion(section = "3.3", id = "unknown")
+ @SpecAssertion(section = "3.3", id = "c")
public void testSingletonWithApplicationScopeOK()
{
deployBeans(Laika.class);
}
- /**
- * If the implementation class of an enterprise Web Bean is annotated @Interceptor
- * or @Decorator, a DefinitionException is thrown by the Web Bean manager at
- * initialization time.
- */
@Test(expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3", id = "unknown")
+ @SpecAssertion(section = "3.3", id = "f")
public void testEnterpriseBeanInterceptorFails()
{
deployBeans(Pug_Broken.class);
}
- /**
- * If the implementation class of an enterprise Web Bean is annotated @Interceptor
- * or @Decorator, a DefinitionException is thrown by the Web Bean manager at
- * initialization time.
- */
@Test(expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3", id = "unknown")
+ @SpecAssertion(section = "3.3", id = "g")
public void testEnterpriseBeanDecoratorFails()
{
deployBeans(Pekingese_Broken.class);
@@ -182,112 +104,75 @@
* annotations.
*/
@Test(expectedExceptions = DefinitionException.class, groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3", id = "unknown")
+ @SpecAssertion(section = "3.3", id = "review")
public void testMultipleAnnotationDefinedEnterpriseBeansWithSameImplementationClassFails()
{
// TODO: testable?
assert false;
}
- /**
- * Note that multiple enterprise Web Beans may share the same implementation
- * class. This occurs when Web Beans are defined using XML
- */
@Test(groups = { "webbeansxml", "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3", id = "unknown")
+ @SpecAssertion(section = "3.3", id = "e")
public void testMultipleXMLDefinedEnterpriseBeansWithSameImplementationClassOK()
{
assert false;
}
- /**
- * All session beans exposing an EJB 3.x client view and declared via an EJB
- * component defining annotation on the EJB bean class are Web Beans, and
- * thus no special declaration is required.
- */
@Test(groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3.2", id = "unknown")
+ @SpecAssertion(section = "3.3.2", id = "a")
public void testAnnotatedEnterpriseBean()
{
// TODO: dupe?
assert false;
}
- /**
- * Additional enterprise Web Beans for these EJBs may be defined using XML,
- * by specifying the bean class in web-beans.xml.
- */
@Test(groups = { "enterpriseBeans", "webbeansxml", "stub" })
- @SpecAssertion(section = "3.3.2", id = "unknown")
+ @SpecAssertion(section = "3.3.2", id = "a")
public void testAnnotatedEnterpriseBeanComplementedWithXML()
{
// TODO dupe?
assert false;
}
- /**
- * All session beans exposing an EJB 3.x client view and declared in
- * ejb-jar.xml are also Web Beans.
- */
@Test(groups = { "enterpriseBeans", "ejbjarxml", "stub" })
- @SpecAssertion(section = "3.3.2", id = "unknown")
+ @SpecAssertion(section = "3.3.2", id = "b")
public void testEJBJARDefinedEnterpriseBean()
{
// TODO dupe?
assert false;
}
- /**
- * Additional enterprise Web Beans for these EJBs may be defined using XML,
- * by specifying the bean class and EJB name in web-beans.xml
- */
@Test(groups = { "enterpriseBeans", "ejbjarxml", "webbeansxml", "stub" })
- @SpecAssertion(section = "3.3.2", id = "unknown")
+ @SpecAssertion(section = "3.3.2", id = "b")
public void testEJBJARDefinedEnterpriseBeanComplementedWithXML()
{
// TODO dupe?
assert false;
}
- /**
- * The set of API types for an enterprise Web Bean contains all local
- * interfaces of the bean that do not have wildcard type parameters or type
- * variables and their superinterfaces
- */
@Test(groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3.3", id = "unknown")
- public void testAPITypesAreLocalInterfacesWithoutWildcardTypesOrTypeVariablesWithSuperInterfaces()
+ @SpecAssertion(section = "3.3.3", id = "a")
+ public void testBeanTypesAreLocalInterfacesWithoutWildcardTypesOrTypeVariablesWithSuperInterfaces()
{
assert false;
}
- /**
- * If the EJB bean has a bean class local view and the bean class is not a
- * parameterized type, the set of API types contains the bean class and all
- * superclasses
- */
@Test(groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3.3", id = "unknown")
- public void testEnterpriseBeanWithLocalViewAndParameterizedTypeIncludesBeanClassAndSuperclassesInAPITypes()
+ @SpecAssertion(section = "3.3.3", id = "b")
+ public void testEnterpriseBeanWithLocalViewAndParameterizedTypeIncludesBeanClassAndSuperclassesInBeanTypes()
{
assert false;
}
- /**
- * In addition, java.lang.Object is an API type of every enterprise Web Bean.
- */
@Test(groups = "enterpriseBeans")
- @SpecAssertion(section = "3.3.3", id = "unknown")
+ @SpecAssertion(section = "3.3.3", id = "c")
public void testObjectIsInAPITypes()
{
assert createEnterpriseBean(Laika.class).getTypes().contains(Object.class);
}
- /**
- * Remote interfaces are not included in the set of API types.
- */
@Test(groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3.3", id = "unknown")
+ @SpecAssertion(section = "3.3.3", id = "d")
public void testRemoteInterfacesAreNotInAPITypes()
{
assert false;
@@ -300,7 +185,7 @@
* attribute declares the EJB name of an EJB defined in ejb-jar.xml
*/
@Test(groups = { "enterpriseBeans", "webbeansxml", "ejbjarxml", "stub" })
- @SpecAssertion(section = "3.3", id = "unknown")
+ @SpecAssertion(section = "3.3", id = "review")
public void testXMLFilesEJBNameUsage()
{
assert false;
@@ -312,19 +197,14 @@
* thrown by the Web Bean manager at initialization time.
*/
@Test(expectedExceptions = DefinitionException.class, groups = { "enterpriseBeans" })
- @SpecAssertion(section = "3.3", id = "unknown")
+ @SpecAssertion(section = "3.3", id = "review")
public void testMessageDrivenBeansNotOK()
{
deployBeans(Leopard.class);
}
- /**
- * The default name for an enterprise Web Bean is the unqualified class name
- * of the Web Bean implementation class, after converting the first character
- * to lower case.
- */
@Test(groups = "enterpriseBeans")
- @SpecAssertion(section = "3.3.8", id = "unknown")
+ @SpecAssertion(section = "3.3.8", id = "a")
public void testDefaultName()
{
assert createEnterpriseBean(Pitbull.class).getName().equals("pitbull");
17 years, 1 month