[webbeans-commits] Webbeans SVN: r1603 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/unit/context and 9 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-19 14:28:32 -0500 (Thu, 19 Feb 2009)
New Revision: 1603
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/deployment/
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/passivating/PassivatingContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/NormalContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/scope/ScopeDefinitionTest.java
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/NewEnterpriseBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/InitializerMethodTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java
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/lookup/injection/InjectionTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Review assertions
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/passivating/PassivatingContextTest.java 2009-02-19 18:42:22 UTC (rev 1602)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/passivating/PassivatingContextTest.java 2009-02-19 19:28:32 UTC (rev 1603)
@@ -44,7 +44,7 @@
*/
// TODO requires an EJB instance
@Test(groups = { "contexts", "passivation", "stub", "integration" })
- @SpecAssertion(section = "review", id = "review")
+ @SpecAssertion(section = "8.4", id = "g")
public void testStatefulEJBIsSerializedWhenPassivatedByEJBContainer() throws IOException, ClassNotFoundException
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java 2009-02-19 18:42:22 UTC (rev 1602)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java 2009-02-19 19:28:32 UTC (rev 1603)
@@ -54,7 +54,7 @@
}
@Test(expectedExceptions = { ContextNotActiveException.class }, groups = { "manager" })
- @SpecAssertion(section = "review", id = "review")
+ @SpecAssertion(section = "8.6", id = "c")
public void testGetContextWithNoActiveContextsFails()
{
getCurrentConfiguration().getContexts().setInactive(getCurrentConfiguration().getContexts().getRequestContext());
@@ -62,7 +62,7 @@
}
@Test(expectedExceptions = { IllegalArgumentException.class }, groups = { "manager" })
- @SpecAssertion(section = "review", id = "review")
+ @SpecAssertion(section = "8.6", id = "c")
public void testGetContextWithTooManyActiveContextsFails()
{
Context firstContext = new DummyContext()
@@ -77,14 +77,14 @@
}
@Test(expectedExceptions = { ContextNotActiveException.class }, groups = { "manager" })
- @SpecAssertion(section = "review", id = "review")
+ @SpecAssertion(section = "8.6", id = "c")
public void testGetContextWithNoRegisteredContextsFails()
{
getCurrentManager().getContext(Unregistered.class);
}
@Test(groups = { "manager" })
- @SpecAssertion(section = "review", id = "review")
+ @SpecAssertion(section = "8.6", id = "b")
public void testGetContextReturnsActiveContext()
{
getCurrentManager().getContext(RequestScoped.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/NormalContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/NormalContextTest.java 2009-02-19 18:42:22 UTC (rev 1602)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/NormalContextTest.java 2009-02-19 19:28:32 UTC (rev 1603)
@@ -168,52 +168,10 @@
* thread
*/
@Test(groups = { "contexts", "stub", "underInvestigation" })
- @SpecAssertion(section = "review", id = "review")
+ @SpecAssertion(section = "8.2", id = "a")
public void testOnlyOneMappedInstancePerContextualTypePerThread()
{
assert false;
}
-
- /*
- * @Test(groups = "contexts")
- *
- * @SpecAssertion(section = "9.3") public void
- * testGetWithCreateFalseReturnsNull() { Bean<Tuna> tunaBean =
- * BeanFactory.createSimpleBean(Tuna.class, manager); assert
- * context.get(tunaBean, false) == null; }
- *
- * @Test(groups = "contexts")
- *
- * @SpecAssertion(section = "8.1") public void
- * testGetWithCreateTrueReturnsBean() { Bean<Tuna> tunaBean =
- * BeanFactory.createSimpleBean(Tuna.class, manager); assert
- * context.get(tunaBean, true) != null; }
- *
- * @Test(groups = "contexts", expectedExceptions =
- * ContextNotActiveException.class)
- *
- * @SpecAssertion(section = "8.1") public void
- * testInactiveContextThrowsContextNotActiveException() { ((AbstractContext)
- * context).setActive(false); context.get(null, false); assert true; }
- *
- * @Test(groups = "contexts")
- *
- * @SpecAssertion(section = "8.1") public void
- * testReturnsCorrectExistingBean() { Bean<Tuna> tunaBean =
- * BeanFactory.createSimpleBean(Tuna.class, manager); Tuna firstTuna =
- * context.get(tunaBean, true); Tuna secondTuna = context.get(tunaBean,
- * false); assert firstTuna == secondTuna; }
- *
- * @Test(groups = { "contexts", "producerMethod" })
- *
- * @SpecAssertion(section = "8.1") public void
- * testProducerMethodReturningNullOK() throws SecurityException,
- * NoSuchMethodException { SimpleBean<SpiderProducer> producer =
- * createSimpleBean(SpiderProducer.class, manager);
- * manager.addBean(producer); Method nullProducer =
- * SpiderProducer.class.getMethod("produceShelob");
- * ProducerMethodBean<Tarantula> shelobBean =
- * createProducerMethodBean(Tarantula.class, nullProducer, producer,
- * manager); assert shelobBean.create() == null; }
- */
+
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/scope/ScopeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/scope/ScopeDefinitionTest.java 2009-02-19 18:42:22 UTC (rev 1602)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/scope/ScopeDefinitionTest.java 2009-02-19 19:28:32 UTC (rev 1603)
@@ -91,30 +91,6 @@
assert false;
}
- @Test(groups={"stub", "webbeansxml"})
- @SpecAssertion(section="review", id = "review")
- public void testScopeMissingInXml()
- {
- //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- //AnnotatedClass<SeaBass> annotatedItem = new SimpleAnnotatedClass<SeaBass>(SeaBass.class, annotations);
-
- //SimpleBean<SeaBass> trout =createSimpleBean(SeaBass.class, annotatedItem, manager);
- //assert trout.getScopeType().equals(RequestScoped.class);
- assert false;
- }
-
- @Test(groups={"stub", "webbeansxml"})
- @SpecAssertion(section="review", id = "review")
- public void testScopeDeclaredInXmlOverridesJava()
- {
- //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- //annotations.put(ConversationScoped.class, new ConversationScopedAnnotationLiteral());
- //AnnotatedClass<SeaBass> annotatedItem = new SimpleAnnotatedClass<SeaBass>(SeaBass.class, annotations);
- //SimpleBean<SeaBass> trout = createSimpleBean(SeaBass.class, annotatedItem, manager);
- //assert trout.getScopeType().equals(ConversationScoped.class);
- assert false;
- }
-
@Test @SpecAssertion(section="2.4.5", id = "a")
public void testDefaultScope()
{
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-19 18:42:22 UTC (rev 1602)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/EnterpriseBeanDeclarationTest.java 2009-02-19 19:28:32 UTC (rev 1603)
@@ -99,21 +99,9 @@
deployBeans(Pekingese_Broken.class);
}
- /**
- * Only one Web Bean per implementation class may be defined using
- * annotations.
- */
- @Test(expectedExceptions = DefinitionException.class, groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "review", id = "review")
- public void testMultipleAnnotationDefinedEnterpriseBeansWithSameImplementationClassFails()
- {
- // TODO: testable?
- assert false;
- }
-
@Test(groups = { "webbeansxml", "enterpriseBeans", "stub" })
@SpecAssertion(section = "3.3", id = "e")
- public void testMultipleXMLDefinedEnterpriseBeansWithSameImplementationClassOK()
+ public void testMultipleXMLDefinedEnterpriseBeansWithSameImplementationClassNotOK()
{
assert false;
}
@@ -178,31 +166,6 @@
assert false;
}
- /**
- * Enterprise Web Beans may be declared in web-beans.xml using the bean class
- * name (for EJBs defined using a component- defining annotation) or bean
- * class and EJB name (for EJBs defined in ejb-jar.xml). The ejbName
- * attribute declares the EJB name of an EJB defined in ejb-jar.xml
- */
- @Test(groups = { "enterpriseBeans", "webbeansxml", "ejbjarxml", "stub" })
- @SpecAssertion(section = "review", id = "review")
- public void testXMLFilesEJBNameUsage()
- {
- assert false;
- }
-
- /**
- * Enterprise Web Beans may not be message-driven beans. If an enterprise Web
- * Bean declared in XML is a message-driven bean, a DefinitionException is
- * thrown by the Web Bean manager at initialization time.
- */
- @Test(expectedExceptions = DefinitionException.class, groups = { "enterpriseBeans" })
- @SpecAssertion(section = "review", id = "review")
- public void testMessageDrivenBeansNotOK()
- {
- deployBeans(Leopard.class);
- }
-
@Test(groups = "enterpriseBeans")
@SpecAssertion(section = "3.3.8", id = "a")
public void testDefaultName()
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 18:42:22 UTC (rev 1602)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/NewEnterpriseBeanTest.java 2009-02-19 19:28:32 UTC (rev 1603)
@@ -71,55 +71,6 @@
{
assert false;
}
-
- /**
- * If the parameter type satisfies the definition of a simple Web Bean
- * implementation class, Section 3.2.1, �Which Java classes are simple Web
- * Beans?�, then the Web Bean is a simple Web Bean. If the parameter type
- * satisfies the definition of an enterprise Web Bean implementation class,
- * Section 3.3.2, �Which EJBs are enterprise Web Beans?�, then the Web Bean
- * is an enterprise Web Bean.
- */
- @Test(groups = { "new", "stub", "ejb3" })
- @SpecAssertion(section = "review", id = "review")
- public void testNewBeanIsEnterpriseWebBeanIfParameterTypeIsEnterpriseWebBean()
- {
- 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" })
-// public void testNewBeanHasSameInitializerMethodsAsWrappedBean()
-// {
-// 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" })
-// public void testNewBeanHasSameInjectedFieldsAsWrappedBean()
-// {
-// assert false;
-// }
@Test(groups = {"new" })
@SpecAssertion(section = "3.3.6", id = "i")
@@ -163,89 +114,6 @@
}
/**
- * 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", "broken" })
- @SpecAssertion(section = "review", id = "review")
- public void testNewBeanHasNoDecorators()
- {
- Annotation[] bindingTypes = newEnterpriseBean.getBindings().toArray(new Annotation[0]);
- assert getCurrentManager().resolveDecorators(newEnterpriseBean.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
- * of the field or parameter is a concrete Java type which satisfies the
- * requirements of a simple Web Bean implementation class or enterprise Web
- * Bean implementation class.
- */
- @Test(groups = { "new" })
- @SpecAssertion(section = "review", id = "review")
- public void testNewAnnotationMayBeAppliedToField()
- {
- deployBeans(AnnotatedField.class, WrappedEnterpriseBean.class);
- assert getCurrentManager().resolveByType(WrappedEnterpriseBean.class, new NewLiteral()).size() == 1;
- }
-
- /**
- * 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
- * of the field or parameter is a concrete Java type which satisfies the
- * requirements of a simple Web Bean implementation class or enterprise Web
- * Bean implementation class.
- */
- @Test(groups = { "new" })
- @SpecAssertion(section = "review", id = "review")
- public void testNewAnnotationMayBeAppliedToProducerMethodParameter()
- {
- deployBeans(AnnotatedProducerParameter.class, WrappedEnterpriseBean.class);
- assert getCurrentManager().resolveByType(WrappedEnterpriseBean.class, new NewLiteral()).size() == 1;
- }
-
- /**
- * 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
- * of the field or parameter is a concrete Java type which satisfies the
- * requirements of a simple Web Bean implementation class or enterprise Web
- * Bean implementation class.
- */
- @Test(groups = { "new" })
- @SpecAssertion(section = "review", id = "review")
- public void testNewAnnotationMayBeAppliedToInitializerMethodParameter()
- {
- deployBeans(AnnotatedInitializerParameter.class, WrappedEnterpriseBean.class);
- assert getCurrentManager().resolveByType(WrappedEnterpriseBean.class, new NewLiteral()).size() == 1;
- }
-
- /**
- * 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
- * of the field or parameter is a concrete Java type which satisfies the
- * requirements of a simple Web Bean implementation class or enterprise Web
- * Bean implementation class.
- */
- @Test(groups = { "new" })
- @SpecAssertion(section = "review", id = "review")
- public void testNewAnnotationMayBeAppliedToConstructorMethodParameter()
- {
- deployBeans(AnnotatedConstructorParameter.class, WrappedEnterpriseBean.class);
- assert getCurrentManager().resolveByType(WrappedEnterpriseBean.class, new NewLiteral()).size() == 1;
- }
-
- /**
* If the @New binding type appears in conjunction with some other binding
* type, or is specified for a field or parameter of a type which does not
* satisfy the definition of a simple Web Bean implementation class or
@@ -285,7 +153,7 @@
assert false;
}
- @Test @SpecAssertion(section="review", id = "review")
+ @Test @SpecAssertion(section="3.3.1", id = "a")
public void testForEachEnterpriseBeanANewBeanExists()
{
deployBeans(Order.class, Lion.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/InitializerMethodTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/InitializerMethodTest.java 2009-02-19 18:42:22 UTC (rev 1602)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/InitializerMethodTest.java 2009-02-19 19:28:32 UTC (rev 1603)
@@ -127,7 +127,7 @@
}
@Test(groups = { "stub", "initializerMethod", "webbeansxml" })
- @SpecAssertion(section = "review", id = "review")
+ @SpecAssertion(section = "3.9", id = "g")
public void testBeanHasAllInitializerMethodsDeclaredInJavaAndXml()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java 2009-02-19 18:42:22 UTC (rev 1602)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java 2009-02-19 19:28:32 UTC (rev 1603)
@@ -62,7 +62,7 @@
*/
@Test(groups = { "broken", "producerField", "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "review", id = "review")
+ @SpecAssertion(section = "outdated", id = "outdated")
public void testProducerFieldIsNotBusinessField() throws Exception
{
deployBeans(VibratingSpiderImpl_Broken.class);
@@ -99,10 +99,8 @@
deployBeans(OtherSpiderProducer.class);
}
- // Review 3.5
@Test(groups = "producerField")
@SpecAssertions({
- @SpecAssertion(section = "review", id = "review"),
@SpecAssertion(section = "2.3.1", id = "a")
})
public void testDefaultBindingType()
@@ -239,8 +237,7 @@
@Test(groups = "producerField")
@SpecAssertions({
@SpecAssertion(section = "2.7.2", id = "c"),
- @SpecAssertion(section = "3.5.2", id = "e"),
- @SpecAssertion(section = "review", id = "review")
+ @SpecAssertion(section = "3.5.2", id = "e")
})
public void testStereotype()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java 2009-02-19 18:42:22 UTC (rev 1602)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java 2009-02-19 19:28:32 UTC (rev 1603)
@@ -43,7 +43,7 @@
}
@Test(groups = { "stub", "producerMethod", "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "review", id = "review")
+ @SpecAssertion(section = "3.4", id = "d")
public void testProducerMethodIsNotBusinessMethod() throws Exception
{
assert false;
@@ -208,7 +208,7 @@
}
@Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "review", id = "review")
+ @SpecAssertion(section = "3.4.2", id = "d")
public void testProducerMethodWithParameterAnnotatedDisposes() throws Exception
{
Bean<SpiderProducer_Broken> bean = createSimpleBean(SpiderProducer_Broken.class);
@@ -218,7 +218,7 @@
}
@Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "review", id = "review")
+ @SpecAssertion(section = "3.4.2", id = "e")
public void testProducerMethodWithParameterAnnotatedObserves() throws Exception
{
Bean<SpiderProducer_Broken> bean = createSimpleBean(SpiderProducer_Broken.class);
@@ -231,7 +231,7 @@
@Test(groups = "producerMethod")
@SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "b"),
@SpecAssertion(section = "3.4.2", id = "ba"),
- @SpecAssertion(section = "review", id = "review") })
+ @SpecAssertion(section = "2.4.5", id = "c") })
public void testStereotypeSpecifiesScope() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -248,7 +248,7 @@
@Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
@SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "b"),
@SpecAssertion(section = "3.4.2", id = "bc"),
- @SpecAssertion(section = "review", id = "review") })
+ @SpecAssertion(section = "2.7.4", id = "b") })
public void testStereotypeEnforcesTypes() throws Exception
{
Bean<SpiderProducer_Broken> bean = createSimpleBean(SpiderProducer_Broken.class);
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 18:42:22 UTC (rev 1602)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/producer/method/ProducerMethodSpecializationTest.java 2009-02-19 19:28:32 UTC (rev 1603)
@@ -94,7 +94,7 @@
}
@Test(expectedExceptions=InconsistentSpecializationException.class)
- @SpecAssertion(section="review", id = "review")
+ @SpecAssertion(section="4.3.3", id = "a")
public void testTwoBeansSpecializeTheSameBean()
{
deployBeans(PictureShop_Broken.class, Bookshop_Broken.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injection/InjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injection/InjectionTest.java 2009-02-19 18:42:22 UTC (rev 1602)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injection/InjectionTest.java 2009-02-19 19:28:32 UTC (rev 1603)
@@ -30,7 +30,7 @@
}
@Test(groups = { "injection", "producerMethod" })
- @SpecAssertion(section = "review", id = "review")
+ @SpecAssertion(section = "5.2", id = "aa")
public void testInjectionPerformsBoxingIfNecessary() throws Exception
{
Bean<SpiderProducer> spiderProducer = createSimpleBean(SpiderProducer.class);
@@ -139,7 +139,7 @@
}
@Test(groups = { "stub", "injection", "webbeansxml" })
- @SpecAssertion(section = "review", id = "review")
+ @SpecAssertion(section = "3.8.2", id = "e")
public void testInjectFieldsDeclaredInXmlAndJava()
{
assert false;
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 18:42:22 UTC (rev 1602)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 19:28:32 UTC (rev 1603)
@@ -1092,6 +1092,11 @@
</section>
<section id="3.3.6" title="Session beans with the @New binding">
+
+ <assertion id="aa">
+ <text>Check that all enterprise beans have a @New bean</text>
+ <note>Sanity check</note>
+ </assertion>
<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>
@@ -1899,6 +1904,11 @@
<assertion id="d">
<text>If the bean class of a bean declared in XML does not have a field with the name and type declared in XML, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
+
+ <assertion id="e">
+ <text>Check fields declared in XML and Java injected</text>
+ <note>Sanity check</note>
+ </assertion>
</section>
<section id="3.9" title="Initializer methods">
@@ -2291,6 +2301,15 @@
</section>
<section id="5.2" title="Primitive types and null values">
+
+
+ <assertion id="aa">
+ <text>If necessary, the container performs boxing when it injects a value to a field or parameter of primitive or wrapper type.</text>
+ </assertion>
+ <assertion id="ab">
+ <text>If necessary, the container performs boxing or unboxing when it injects a value to a field or parameter of primitive or wrapper type.</text>
+ </assertion>
+
<assertion id="a">
<text>If an injection point of primitive type resolves to a bean that may be null, such as a producer method with a nonprimitive return type or a producer field with a non-primitive type, a NullableDependencyException is thrown by the container at deployment time</text>
</assertion>
@@ -3678,8 +3697,7 @@
</assertion>
<assertion id="c">
- <text>If no active context object exists for the given scope type,
-Manager.getContext() must throw a ContextNotActiveException</text>
+ <text>If no active context object exists for the given scope type, Manager.getContext() must throw a ContextNotActiveException</text>
</assertion>
<assertion id="d">
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1602 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/unit/context and 22 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-19 13:42:22 -0500 (Thu, 19 Feb 2009)
New Revision: 1602
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/type/
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/passivating/PassivatingContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/NormalContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/PassivatingContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/bean/BeanDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/binding/BindingDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/defaultDeploymentType/DefaultDeploymentTypeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/name/NameDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/scope/ScopeDefinitionTest.java
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/enterprise/EnterpriseBeanDeclarationTest.java
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/initializer/InitializerMethodTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/interceptor/InterceptorDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/jms/JmsDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodLifecycleTest.java
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/SimpleBeanDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanLifecycleTest.java
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/lookup/clientProxy/ClientProxyTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/clientProxy/unproxyable/UnproxyableTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injection/InjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injectionpoint/InjectionPointTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/manager/ManagerTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Map tests which have assertions
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/passivating/PassivatingContextTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/passivating/PassivatingContextTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -4,8 +4,8 @@
import javax.inject.IllegalProductException;
+import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
-import org.hibernate.tck.annotations.SpecAssertion;
import org.testng.annotations.Test;
/**
@@ -44,7 +44,7 @@
*/
// TODO requires an EJB instance
@Test(groups = { "contexts", "passivation", "stub", "integration" })
- @SpecAssertion(section = "8.4", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testStatefulEJBIsSerializedWhenPassivatedByEJBContainer() throws IOException, ClassNotFoundException
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -54,7 +54,7 @@
}
@Test(expectedExceptions = { ContextNotActiveException.class }, groups = { "manager" })
- @SpecAssertion(section = "8.5", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testGetContextWithNoActiveContextsFails()
{
getCurrentConfiguration().getContexts().setInactive(getCurrentConfiguration().getContexts().getRequestContext());
@@ -62,7 +62,7 @@
}
@Test(expectedExceptions = { IllegalArgumentException.class }, groups = { "manager" })
- @SpecAssertion(section = "8.5", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testGetContextWithTooManyActiveContextsFails()
{
Context firstContext = new DummyContext()
@@ -77,14 +77,14 @@
}
@Test(expectedExceptions = { ContextNotActiveException.class }, groups = { "manager" })
- @SpecAssertion(section = "8.5", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testGetContextWithNoRegisteredContextsFails()
{
getCurrentManager().getContext(Unregistered.class);
}
@Test(groups = { "manager" })
- @SpecAssertion(section = "8.5", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testGetContextReturnsActiveContext()
{
getCurrentManager().getContext(RequestScoped.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/NormalContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/NormalContextTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/NormalContextTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -8,8 +8,8 @@
import javax.context.SessionScoped;
import javax.inject.manager.Bean;
+import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
-import org.hibernate.tck.annotations.SpecAssertion;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -168,7 +168,7 @@
* thread
*/
@Test(groups = { "contexts", "stub", "underInvestigation" })
- @SpecAssertion(section = "8.1", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testOnlyOneMappedInstancePerContextualTypePerThread()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/PassivatingContextTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/passivating/PassivatingContextTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -10,8 +10,8 @@
import javax.inject.UnserializableDependencyException;
import javax.inject.manager.Bean;
+import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
-import org.hibernate.tck.annotations.SpecAssertion;
import org.testng.annotations.Test;
/**
@@ -39,14 +39,14 @@
assert !beans.isEmpty();
}
- @Test @SpecAssertion(section="8.4", id = "unknown")
+ @Test @SpecAssertion(section="8.4", id = "ca")
public void testInjectionOfDependentSerializableProductIntoNormalBean()
{
deployBeans(Generator.class, NumberConsumer.class);
getCurrentManager().getInstanceByType(NumberConsumer.class).ping();
}
- @Test @SpecAssertion(section="8.4", id = "outdated")
+ @Test @SpecAssertion(section="8.4", id = "cb")
public void testInjectionOfDependentPrimitiveProductIntoNormalBean()
{
deployBeans(Generator.class, FooConsumer.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/bean/BeanDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/bean/BeanDefinitionTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/bean/BeanDefinitionTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -75,7 +75,7 @@
@Test
@SpecAssertions({
- @SpecAssertion(section = "3.2.2", id = "unknown"),
+ @SpecAssertion(section = "3.2.2", id = "a"),
@SpecAssertion(section = "2.2", id = "a"),
@SpecAssertion(section = "2.2", id = "d"),
@SpecAssertion(section = "2.2", id = "e"),
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/binding/BindingDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/binding/BindingDefinitionTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/binding/BindingDefinitionTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -206,7 +206,7 @@
}
@Test
- @SpecAssertion(section = "4.1", id = "unknown")
+ @SpecAssertion(section = "4.1", id = "e")
public void testBindingDeclaredInheritedIsInherited() throws Exception
{
Set<? extends Annotation> bindings = getCurrentManager().resolveByType(BorderCollie.class, new HairyBinding(false)).iterator().next().getBindings();
@@ -215,7 +215,7 @@
}
@Test
- @SpecAssertion(section = "4.1", id = "unknown")
+ @SpecAssertion(section = "4.1", id = "e")
public void testBindingNotDeclaredInheritedIsNotInherited()
{
Set<? extends Annotation> bindings = getCurrentManager().resolveByType(ShetlandPony.class).iterator().next().getBindings();
@@ -224,7 +224,7 @@
}
@Test
- @SpecAssertion(section = "4.1", id = "unknown")
+ @SpecAssertion(section = "4.1", id = "e")
public void testBindingDeclaredInheritedIsBlockedByIntermediateClass()
{
Set<? extends Annotation> bindings = getCurrentManager().resolveByType(ClippedBorderCollie.class, new HairyBinding(true)).iterator().next().getBindings();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/defaultDeploymentType/DefaultDeploymentTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/defaultDeploymentType/DefaultDeploymentTypeTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/defaultDeploymentType/DefaultDeploymentTypeTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -20,7 +20,7 @@
@Test
@SpecAssertions({
- @SpecAssertion(section = "2.5.6", id = "unknown")
+ @SpecAssertion(section = "2.5.6", id = "d")
})
public void testDefaultEnabledDeploymentTypes()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/name/NameDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/name/NameDefinitionTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/name/NameDefinitionTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -62,26 +62,6 @@
}
@Test(groups={"stub", "webbeansxml"})
- @SpecAssertion(section="2.6.2", id = "unknown")
- public void testXmlNamedOverridesJavaNamed()
- {
- /*Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- annotations.put(Named.class, new NamedAnnotationLiteral(){
-
- public String value()
- {
- return "aTrout";
- }
-
- });
- AnnotatedClass<Cod> annotatedItem = new SimpleAnnotatedClass<Cod>(Cod.class, annotations);*/
- //SimpleBean<Cod> cod = createSimpleBean(Cod.class, annotatedItem, manager);
-
- //assert cod.getName().equals("aTrout");
- assert false;
- }
-
- @Test(groups={"stub", "webbeansxml"})
@SpecAssertions({
@SpecAssertion(section="2.6.2", id = "b"),
@SpecAssertion(section = "2.6.3",id = "b")
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/scope/ScopeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/scope/ScopeDefinitionTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/scope/ScopeDefinitionTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -27,7 +27,7 @@
}
@Test(groups={"underInvestigation", "annotationDefinition"})
- @SpecAssertion(section="2.4.2", id = "unknown")
+ @SpecAssertion(section="2.4.2", id = "a")
public void testScopeTypeHasCorrectTarget()
{
assert false;
@@ -92,7 +92,7 @@
}
@Test(groups={"stub", "webbeansxml"})
- @SpecAssertion(section="2.4.4", id = "review")
+ @SpecAssertion(section="review", id = "review")
public void testScopeMissingInXml()
{
//Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
@@ -104,7 +104,7 @@
}
@Test(groups={"stub", "webbeansxml"})
- @SpecAssertion(section="2.4.4", id = "review")
+ @SpecAssertion(section="review", id = "review")
public void testScopeDeclaredInXmlOverridesJava()
{
//Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
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 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/deployment/BeanDeploymentTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -91,7 +91,7 @@
}
@Test(groups={"stub", "specialization"})
- @SpecAssertion(section="3.3.4", id = "review")
+ @SpecAssertion(section="review", id = "review")
public void testOnlySpecializedProducerMethodBeanDeployed()
{
// TODO Placeholder
@@ -99,7 +99,7 @@
}
@Test(groups={"stub", "specialization"})
- @SpecAssertion(section="3.3.4", id = "review")
+ @SpecAssertion(section="review", id = "review")
public void testSpecializedProducerMethodBeanDirectlyOverrides()
{
// TODO Placeholder
@@ -107,7 +107,7 @@
}
@Test(groups={"stub", "specialization"})
- @SpecAssertion(section="3.3.4", id = "review")
+ @SpecAssertion(section="review", id = "review")
public void testSpecializedProducerMethodBeanHasSameBindingAnnotations()
{
// TODO Placeholder
@@ -115,7 +115,7 @@
}
@Test(groups={"stub", "specialization"})
- @SpecAssertion(section="3.3.4", id = "review")
+ @SpecAssertion(section="review", id = "review")
public void testSpecializedProducerMethodBeanHasSameName()
{
// TODO Placeholder
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-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/EnterpriseBeanDeclarationTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -72,7 +72,7 @@
}
@Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3", id = "")
+ @SpecAssertion(section = "3.3", id = "d")
public void testSingletonWithSessionScopeFails()
{
deployBeans(IrishTerrier_Broken.class);
@@ -104,7 +104,7 @@
* annotations.
*/
@Test(expectedExceptions = DefinitionException.class, groups = { "enterpriseBeans", "stub" })
- @SpecAssertion(section = "3.3", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testMultipleAnnotationDefinedEnterpriseBeansWithSameImplementationClassFails()
{
// TODO: testable?
@@ -185,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 = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testXMLFilesEJBNameUsage()
{
assert false;
@@ -197,7 +197,7 @@
* thrown by the Web Bean manager at initialization time.
*/
@Test(expectedExceptions = DefinitionException.class, groups = { "enterpriseBeans" })
- @SpecAssertion(section = "3.3", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testMessageDrivenBeansNotOK()
{
deployBeans(Leopard.class);
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 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/NewEnterpriseBeanTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -11,8 +11,8 @@
import javax.inject.Standard;
import javax.inject.manager.Bean;
+import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
-import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.literals.NewLiteral;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -81,7 +81,7 @@
* is an enterprise Web Bean.
*/
@Test(groups = { "new", "stub", "ejb3" })
- @SpecAssertion(section = "3.3.6", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testNewBeanIsEnterpriseWebBeanIfParameterTypeIsEnterpriseWebBean()
{
assert false;
@@ -174,7 +174,7 @@
* � has no decorators.
*/
@Test(groups = { "new", "broken" })
- @SpecAssertion(section = "3.3.6", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testNewBeanHasNoDecorators()
{
Annotation[] bindingTypes = newEnterpriseBean.getBindings().toArray(new Annotation[0]);
@@ -190,7 +190,7 @@
* Bean implementation class.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.3.6", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testNewAnnotationMayBeAppliedToField()
{
deployBeans(AnnotatedField.class, WrappedEnterpriseBean.class);
@@ -206,7 +206,7 @@
* Bean implementation class.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.3.6", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testNewAnnotationMayBeAppliedToProducerMethodParameter()
{
deployBeans(AnnotatedProducerParameter.class, WrappedEnterpriseBean.class);
@@ -222,7 +222,7 @@
* Bean implementation class.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.3.6", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testNewAnnotationMayBeAppliedToInitializerMethodParameter()
{
deployBeans(AnnotatedInitializerParameter.class, WrappedEnterpriseBean.class);
@@ -238,7 +238,7 @@
* Bean implementation class.
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.3.6", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testNewAnnotationMayBeAppliedToConstructorMethodParameter()
{
deployBeans(AnnotatedConstructorParameter.class, WrappedEnterpriseBean.class);
@@ -253,7 +253,7 @@
* by the container at deployment time.
*/
@Test(groups = { "new" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3.6", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testNewAnnotationCannotAppearInConjunctionWithOtherBindingType()
{
deployBeans(NewAndOtherBindingType_Broken.class);
@@ -277,7 +277,7 @@
* as a binding type
*/
@Test(groups = { "stub", "new", "webbeansxml" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.3.6", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testNewAnnotationCannotBeExplicitlyDeclared()
{
// This only needs to be tested with XML since the annotation itself
@@ -285,7 +285,7 @@
assert false;
}
- @Test @SpecAssertion(section="3.2.6", id = "review")
+ @Test @SpecAssertion(section="review", id = "review")
public void testForEachEnterpriseBeanANewBeanExists()
{
deployBeans(Order.class, Lion.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/InitializerMethodTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/InitializerMethodTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/InitializerMethodTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -127,7 +127,7 @@
}
@Test(groups = { "stub", "initializerMethod", "webbeansxml" })
- @SpecAssertion(section = "3.9.2", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testBeanHasAllInitializerMethodsDeclaredInJavaAndXml()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/interceptor/InterceptorDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/interceptor/InterceptorDefinitionTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/interceptor/InterceptorDefinitionTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -11,13 +11,13 @@
public class InterceptorDefinitionTest
{
- @Test(groups="stub") @SpecAssertion(section="4.2", id = "unknown")
+ @Test(groups="stub") @SpecAssertion(section="4.2", id = "c")
public void testNonStaticWithInterceptorBindingInherited()
{
assert false;
}
- @Test(groups="stub") @SpecAssertion(section="4.2", id = "unknown")
+ @Test(groups="stub") @SpecAssertion(section="4.2", id = "c")
public void testNonStaticWithInterceptorBindingBlockedByIntermediateClass()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/jms/JmsDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/jms/JmsDefinitionTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/jms/JmsDefinitionTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -1,10 +1,6 @@
package org.jboss.jsr299.tck.unit.implementation.jms;
-import javax.inject.DefinitionException;
-
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
-import org.hibernate.tck.annotations.SpecAssertion;
-import org.testng.annotations.Test;
/**
*
@@ -14,11 +10,4 @@
public class JmsDefinitionTest extends AbstractDeclarativeTest
{
- @Test(expectedExceptions=DefinitionException.class, groups={"stub", "jms"})
- @SpecAssertion(section="2.6", id = "unknown")
- public void testJmsEndpointHasName()
- {
- assert false;
- }
-
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -62,7 +62,7 @@
*/
@Test(groups = { "broken", "producerField", "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.5", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testProducerFieldIsNotBusinessField() throws Exception
{
deployBeans(VibratingSpiderImpl_Broken.class);
@@ -99,9 +99,10 @@
deployBeans(OtherSpiderProducer.class);
}
+ // Review 3.5
@Test(groups = "producerField")
@SpecAssertions({
- @SpecAssertion(section = "3.5", id = "review"),
+ @SpecAssertion(section = "review", id = "review"),
@SpecAssertion(section = "2.3.1", id = "a")
})
public void testDefaultBindingType()
@@ -234,11 +235,12 @@
assert tarantulaModel.getName().equals("produceTarantula");
}
+ // review 2.2
@Test(groups = "producerField")
@SpecAssertions({
@SpecAssertion(section = "2.7.2", id = "c"),
@SpecAssertion(section = "3.5.2", id = "e"),
- @SpecAssertion(section = "2.2", id = "review")
+ @SpecAssertion(section = "review", id = "review")
})
public void testStereotype()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -8,9 +8,9 @@
import javax.inject.Production;
import javax.inject.manager.Bean;
-import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.testng.annotations.Test;
/**
@@ -43,7 +43,7 @@
}
@Test(groups = { "stub", "producerMethod", "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.4", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testProducerMethodIsNotBusinessMethod() throws Exception
{
assert false;
@@ -137,7 +137,7 @@
@Test(groups = "producerMethod")
@SpecAssertions( { @SpecAssertion(section = "3.4.1", id = "b"),
- @SpecAssertion(section = "2.2", id = "unknown") })
+ @SpecAssertion(section = "2.2", id = "j") })
public void testApiTypeForArrayTypeReturn() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -208,7 +208,7 @@
}
@Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.4", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testProducerMethodWithParameterAnnotatedDisposes() throws Exception
{
Bean<SpiderProducer_Broken> bean = createSimpleBean(SpiderProducer_Broken.class);
@@ -218,7 +218,7 @@
}
@Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.4", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testProducerMethodWithParameterAnnotatedObserves() throws Exception
{
Bean<SpiderProducer_Broken> bean = createSimpleBean(SpiderProducer_Broken.class);
@@ -227,10 +227,11 @@
createProducerMethodBean(method, bean);
}
+ // Review 2.2
@Test(groups = "producerMethod")
@SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "b"),
@SpecAssertion(section = "3.4.2", id = "ba"),
- @SpecAssertion(section = "2.2", id = "review") })
+ @SpecAssertion(section = "review", id = "review") })
public void testStereotypeSpecifiesScope() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -247,7 +248,7 @@
@Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
@SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "b"),
@SpecAssertion(section = "3.4.2", id = "bc"),
- @SpecAssertion(section = "2.2", id = "review") })
+ @SpecAssertion(section = "review", id = "review") })
public void testStereotypeEnforcesTypes() throws Exception
{
Bean<SpiderProducer_Broken> bean = createSimpleBean(SpiderProducer_Broken.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodLifecycleTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodLifecycleTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -83,7 +83,7 @@
}
@Test(groups = { "producerMethod", "broken" })
- @SpecAssertions( { @SpecAssertion(section = "3.4", id = "unknown"), @SpecAssertion(section = "B.1", id = "unknown"), @SpecAssertion(section = "7.3", id = "unknown") })
+ @SpecAssertions( { @SpecAssertion(section = "3.4", id = "e"), @SpecAssertion(section = "B.1", id = "unknown"), @SpecAssertion(section = "7.3", id = "unknown") })
public void testProducerMethodReturnsNullIsDependent() throws Exception
{
Bean<SpiderProducer> spiderProducer = createSimpleBean(SpiderProducer.class);
@@ -95,7 +95,7 @@
}
@Test(groups = "producerMethod", expectedExceptions = IllegalProductException.class)
- @SpecAssertions( { @SpecAssertion(section = "3.4", id = "unknown"), @SpecAssertion(section = "B.1", id = "unknown") })
+ @SpecAssertions( { @SpecAssertion(section = "3.4", id = "f"), @SpecAssertion(section = "B.1", id = "unknown") })
public void testProducerMethodReturnsNullIsNotDependent() throws Exception
{
Bean<SpiderProducer_Broken> spiderProducer = createSimpleBean(SpiderProducer_Broken.class);
@@ -105,6 +105,7 @@
}
@Test(expectedExceptions = CreationException.class)
+ @SpecAssertion(section="6.7", id="unknown")
public void testCreationExceptionWrapsCheckedExceptionThrownFromCreate() throws Exception
{
deployBeans(LorryProducer_Broken.class);
@@ -120,6 +121,7 @@
}
@Test(expectedExceptions = FooException.class)
+ @SpecAssertion(section="6.7", id="unknown")
public void testUncheckedExceptionThrownFromCreateNotWrapped() throws Exception
{
deployBeans(ShipProducer_Broken.class);
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 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/NewSimpleBeanTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -118,74 +118,6 @@
}
/**
- * 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
- * of the field or parameter is a concrete Java type which satisfies the
- * requirements of a simple Web Bean implementation class or enterprise Web
- * Bean implementation class.
- * TODO This is not defined behavior in the spec in section 3.2.5
- */
- @Test(groups = { "new", "underInvestigation" })
- @SpecAssertion(section = "3.2.5", id = "unknown")
- public void testNewAnnotationMayBeAppliedToField()
- {
- deployBeans(AnnotatedField.class, WrappedSimpleBean.class);
- assert getCurrentManager().resolveByType(WrappedSimpleBean.class, new NewLiteral()).size() == 1;
- }
-
- /**
- * 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
- * of the field or parameter is a concrete Java type which satisfies the
- * requirements of a simple Web Bean implementation class or enterprise Web
- * Bean implementation class.
- * TODO This is not defined behavior in the spec in section 3.2.5
- */
- @Test(groups = { "new" })
- @SpecAssertion(section = "3.2.5", id = "unknown")
- public void testNewAnnotationMayBeAppliedToProducerMethodParameter()
- {
- deployBeans(AnnotatedProducerParameter.class, WrappedSimpleBean.class);
- assert getCurrentManager().resolveByType(WrappedSimpleBean.class, new NewLiteral()).size() == 1;
- }
-
- /**
- * 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
- * of the field or parameter is a concrete Java type which satisfies the
- * requirements of a simple Web Bean implementation class or enterprise Web
- * Bean implementation class.
- * TODO This is not defined behavior in the spec in section 3.2.5
- */
- @Test(groups = { "new", "underInvestigation" })
- @SpecAssertion(section = "3.2.5", id = "unknown")
- public void testNewAnnotationMayBeAppliedToInitializerMethodParameter()
- {
- deployBeans(AnnotatedInitializerParameter.class, WrappedSimpleBean.class);
- assert getCurrentManager().resolveByType(WrappedSimpleBean.class, new NewLiteral()).size() == 1;
- }
-
- /**
- * 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
- * of the field or parameter is a concrete Java type which satisfies the
- * requirements of a simple Web Bean implementation class or enterprise Web
- * Bean implementation class.
- * TODO This is not defined behavior in the spec in section 3.2.5
- */
- @Test(groups = { "new" })
- @SpecAssertion(section = "3.2.5", id = "unknown")
- public void testNewAnnotationMayBeAppliedToConstructorMethodParameter()
- {
- deployBeans(AnnotatedConstructorParameter.class, WrappedSimpleBean.class);
- assert getCurrentManager().resolveByType(WrappedSimpleBean.class, new NewLiteral()).size() == 1;
- }
-
- /**
* If the @New binding type appears in conjunction with some other binding
* type, or is specified for a field or parameter of a type which does not
* satisfy the definition of a simple Web Bean implementation class or
@@ -194,33 +126,18 @@
* TODO This is not defined behavior in the spec in section 3.2.5
*/
@Test(groups = { "new" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "unknown", id = "unknown")
+ @SpecAssertion(section = "review", id = "review")
public void testNewAnnotationCannotAppearInConjunctionWithOtherBindingType()
{
deployBeans(NewAndOtherBindingType_Broken.class);
}
/**
- * If the @New binding type appears in conjunction with some other binding
- * type, or is specified for a field or parameter of a type which does not
- * satisfy the definition of a simple Web Bean implementation class or
- * enterprise Web Bean implementation class, a DefinitionException is thrown
- * by the container at deployment time.
- * TODO This is not defined behavior in the spec in section 3.2.5
- */
- @Test(groups = { "underInvestigation", "new" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.2.5", id = "unknown")
- public void testNewAnnotationCannotBeAppliedToNonWebBeanImplementationClass()
- {
- assert false;
- }
-
- /**
* No Web Bean defined using annotations or XML may explicitly declare @New
* as a binding type
*/
@Test(groups = { "new" })
- @SpecAssertion(section = "3.2.5", id = "unknown")
+ @SpecAssertion(section = "review", id = "review")
public void testNewAnnotationCannotBeExplicitlyDeclared()
{
// All we can really do is make sure the annotation itself
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 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanDefinitionTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -60,19 +60,6 @@
createSimpleBean(ParameterizedBean_Broken.class);
}
- @Test(expectedExceptions = DefinitionException.class, groups = { "stub", "interceptors", "decorators" })
- @SpecAssertion(section = "3.2.1", id = "unknown")
- public void testClassCannotBeInterceptorAndDecorator()
- {
-
- }
-
- // @Test(groups="stub")
- // public void testEntitiesNotDiscoveredAsSimpleBeans()
- // {
- // assert false;
- // }
-
@Test
@SpecAssertions( {
@SpecAssertion(section = "3.2.1", id = "g"),
@@ -106,33 +93,6 @@
assert getCurrentManager().resolveByType(MockUIComponent.class).size() == 0;
}
- // @Test(groups="stub")
- // public void testEjbsNotDiscoveredAsSimpleBean()
- // {
- // assert false;
- // }
- //
- @Test(groups = { "stub", "producerMethod", "webbeansxml" })
- @SpecAssertion(section = "3.2.4", id = "unknown")
- public void testBeanDeclaredInXmlIgnoresProducerMethodDeclaredInJava()
- {
- assert false;
- }
-
- @Test(groups = { "stub", "disposalMethod", "webbeansxml" })
- @SpecAssertion(section = "3.2.4", id = "unknown")
- public void testBeanDeclaredInXmlIgnoresDisposalMethodDeclaredInJava()
- {
- assert false;
- }
-
- @Test(groups = { "stub", "observerMethod", "webbeansxml" })
- @SpecAssertion(section = "3.2.4", id = "unknown")
- public void testBeanDeclaredInXmlIgnoresObserverMethodDeclaredInJava()
- {
- assert false;
- }
-
@Test(expectedExceptions = DefinitionException.class, groups = { "stub", "webbeansxml" })
@SpecAssertion(section = "3.2.4", id = "e")
public void testAbstractClassDeclaredInXmlIsNotAllowed()
@@ -292,23 +252,7 @@
}
@Test
- @SpecAssertion(section = "3.2.6.3", id = "unknown")
- public void testBindingTypeAnnotatedConstructor() throws Exception
- {
- deployBeans(Duck.class);
- new RunInDependentContext()
- {
- @Override
- protected void execute() throws Exception
- {
- getCurrentManager().getInstanceByType(Duck.class);
- assert Duck.constructedCorrectly;
- }
- }.run();
- }
-
- @Test
- @SpecAssertion(section = "3.2", id = "unknown")
+ @SpecAssertion(section = "3.2", id = "fa")
public void testDependentScopedBeanCanHavePublicField() throws Exception
{
deployBeans(Tiger.class);
@@ -326,7 +270,7 @@
}
@Test(expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.2", id = "unknown")
+ @SpecAssertion(section = "3.2", id = "fb")
public void testNonDependentScopedBeanCanNotHavePublicField()
{
deployBeans(Leopard_Broken.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanLifecycleTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanLifecycleTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -46,6 +46,22 @@
FishPond fishPond = goldfishPondBean.create(new MockCreationalContext<FishPond>());
assert fishPond.goldfish != null;
}
+
+ @Test
+ @SpecAssertion(section = "3.2.6.3", id = "a")
+ public void testBindingTypeAnnotatedConstructor() throws Exception
+ {
+ deployBeans(Duck.class);
+ new RunInDependentContext()
+ {
+ @Override
+ protected void execute() throws Exception
+ {
+ getCurrentManager().getInstanceByType(Duck.class);
+ assert Duck.constructedCorrectly;
+ }
+ }.run();
+ }
@Test(groups = { "broken", "specialization" })
@SpecAssertion(section = "3.2.7", id = "c")
@@ -238,7 +254,7 @@
* @throws Exception
*/
@Test
- @SpecAssertion(section = "4.2", id = "unknown")
+ @SpecAssertion(section = "4.2", id = "ba")
public void testSubClassDoesNotInheritPostConstructOnSuperclassBlockedByIntermediateClass() throws Exception
{
@@ -264,7 +280,7 @@
* @throws Exception
*/
@Test
- @SpecAssertion(section = "4.2", id = "unknown")
+ @SpecAssertion(section = "4.2", id = "bb")
public void testSubClassDoesNotInheritPreDestroyConstructOnSuperclassBlockedByIntermediateClass() throws Exception
{
OrderProcessor.preDestroyCalled = false;
@@ -283,6 +299,7 @@
}
@Test(groups = "injection")
+ @SpecAssertion(section = "outdated", id = "outdated")
public void testFieldMissingBindingAnnotationsAreNotInjected()
{
Bean<TunaFarm> tunaFarmBean = createSimpleBean(TunaFarm.class);
@@ -293,6 +310,7 @@
}
@Test(expectedExceptions = CreationException.class)
+ @SpecAssertion(section = "6.5", id = "unknown")
public void testCreationExceptionWrapsCheckedExceptionThrownFromCreate() throws Exception
{
deployBeans(Lorry_Broken.class);
@@ -308,6 +326,7 @@
}
@Test(expectedExceptions = FooException.class)
+ @SpecAssertion(section = "6.5", id = "unknown")
public void testUncheckedExceptionThrownFromCreateNotWrapped() throws Exception
{
deployBeans(Van_Broken.class);
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 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/producer/method/ProducerMethodSpecializationTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -10,9 +10,9 @@
import javax.inject.DefinitionException;
import javax.inject.InconsistentSpecializationException;
-import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.testng.annotations.Test;
/**
@@ -94,7 +94,7 @@
}
@Test(expectedExceptions=InconsistentSpecializationException.class)
- @SpecAssertion(section="4.3.1", id = "review")
+ @SpecAssertion(section="review", id = "review")
public void testTwoBeansSpecializeTheSameBean()
{
deployBeans(PictureShop_Broken.class, Bookshop_Broken.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/clientProxy/ClientProxyTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/clientProxy/ClientProxyTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/clientProxy/ClientProxyTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -18,16 +18,16 @@
public class ClientProxyTest extends AbstractDeclarativeTest
{
- @Test(groups = "configuration().getBeans()")
- @SpecAssertion(section = "5.4", id = "unknown")
+ @Test
+ @SpecAssertion(section = "5.4", id = "b")
public void testClientProxyUsedForNormalScope()
{
Tuna tuna = getCurrentManager().getInstanceByType(Tuna.class);
assert getCurrentConfiguration().getBeans().isProxy(tuna);
}
- @Test(groups = "configuration().getBeans()")
- @SpecAssertion(section = "5.4", id = "unknown")
+ @Test
+ @SpecAssertion(section = "5.4", id = "a")
public void testClientProxyNotUsedForPseudoScope() throws Exception
{
new RunInDependentContext()
@@ -44,8 +44,8 @@
}.run();
}
- @Test(groups = "configuration().getBeans()")
- @SpecAssertion(section = "5.4", id = "unknown")
+ @Test
+ @SpecAssertion(section = "5.4", id = "c")
public void testSimpleWebBeanClientProxyIsSerializable() throws IOException, ClassNotFoundException
{
TunedTuna tuna = getCurrentManager().getInstanceByType(TunedTuna.class);
@@ -56,8 +56,8 @@
assert tuna.getState().equals("tuned");
}
- @Test(groups = "configuration().getBeans()")
- @SpecAssertion(section = "5.4.2", id = "unknown")
+ @Test
+ @SpecAssertion(section = "review", id = "review")
public void testClientProxyInvocation()
{
Bean<TunedTuna> tunaBean = getCurrentManager().resolveByType(TunedTuna.class).iterator().next();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/clientProxy/unproxyable/UnproxyableTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/clientProxy/unproxyable/UnproxyableTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/clientProxy/unproxyable/UnproxyableTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -5,14 +5,16 @@
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.jboss.jsr299.tck.impl.packaging.Artifact;
+import org.jboss.jsr299.tck.impl.packaging.ExpectedDeploymentException;
import org.testng.annotations.Test;
@Artifact
// TODO This test can be fixed by specifying the exception that is expected as below
+(a)ExpectedDeploymentException(UnproxyableDependencyException.class)
public class UnproxyableTest extends AbstractDeclarativeTest
{
- @Test(groups = { "configuration().getBeans()", "broken" }, expectedExceptions = UnproxyableDependencyException.class)
- @SpecAssertion(section = "5.4.1", id = "unknown")
+ @Test
+ @SpecAssertion(section = "5.4.1", id = "e")
public void testInjectionPointWithUnproxyableTypeWhichResolvesToNormalScopedWebBean()
{
@SuppressWarnings("unused")
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injection/InjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injection/InjectionTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injection/InjectionTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -30,7 +30,7 @@
}
@Test(groups = { "injection", "producerMethod" })
- @SpecAssertion(section = "5.2", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testInjectionPerformsBoxingIfNecessary() throws Exception
{
Bean<SpiderProducer> spiderProducer = createSimpleBean(SpiderProducer.class);
@@ -74,7 +74,7 @@
}
@Test(groups = "injection", expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.7", id = "outdated")
+ @SpecAssertion(section = "outdated", id = "outdated")
public void testInjectingStaticField()
{
Bean<BeanWithStaticBoundField_Broken> bean = createSimpleBean(BeanWithStaticBoundField_Broken.class);
@@ -84,7 +84,7 @@
}
@Test(groups = "injection", expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.7", id = "outdated")
+ @SpecAssertion(section = "outdated", id = "outdated")
public void testInjectingFinalField()
{
Bean<BeanWithFinalBoundField_Broken> bean = createSimpleBean(BeanWithFinalBoundField_Broken.class);
@@ -93,7 +93,7 @@
bean.create(new MockCreationalContext<BeanWithFinalBoundField_Broken>());
}
- @Test @SpecAssertion(section="4.2", id = "unknown")
+ @Test @SpecAssertion(section="4.2", id = "a")
public void testFieldDeclaredInSuperclassInjected() throws Exception
{
deployBeans(Fox.class, DeluxeHenHouse.class, HenHouse.class);
@@ -139,7 +139,7 @@
}
@Test(groups = { "stub", "injection", "webbeansxml" })
- @SpecAssertion(section = "3.8.2", id = "review")
+ @SpecAssertion(section = "review", id = "review")
public void testInjectFieldsDeclaredInXmlAndJava()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injectionpoint/InjectionPointTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injectionpoint/InjectionPointTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injectionpoint/InjectionPointTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -232,7 +232,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.6", id = "za")
+ @SpecAssertion(section = "5.6.1", id = "za")
public void testStandardDeployment() throws Exception
{
deployBeans();
@@ -251,7 +251,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.6", id = "zb")
+ @SpecAssertion(section = "5.6.1", id = "zb")
public void testDependentScope() throws Exception
{
deployBeans();
@@ -270,7 +270,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.6", id = "zc")
+ @SpecAssertion(section = "5.6.1", id = "zc")
public void testApiTypeInjectionPoint()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -291,7 +291,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.6", id = "zd")
+ @SpecAssertion(section = "5.6.1", id = "zd")
public void testCurrentBinding()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/manager/ManagerTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/manager/ManagerTest.java 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/manager/ManagerTest.java 2009-02-19 18:42:22 UTC (rev 1602)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.unit.lookup.manager;
+import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
-import org.hibernate.tck.annotations.SpecAssertion;
import org.testng.annotations.Test;
/**
@@ -12,7 +12,7 @@
public class ManagerTest extends AbstractDeclarativeTest
{
@Test(groups={"manager", "injection", "deployment"})
- @SpecAssertion(section="5.7", id = "unknown")
+ @SpecAssertion(section="5.7.2", id = "a")
public void testInjectingManager() throws Exception
{
deployBeans(FishFarmOffice.class);
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 17:35:10 UTC (rev 1601)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 18:42:22 UTC (rev 1602)
@@ -691,9 +691,14 @@
<text>Multiple simple beans may share the same bean class. This occurs when beans are defined using XML. Only one simple bean per bean class may be defined using annotations.</text>
</assertion>
- <assertion id="f">
- <text>If a simple bean has a public field, it must have scope @Dependent. If a simple bean with a public field declares any scope other than @Dependent, a DefinitionException is thrown by the container at deployment time.</text>
+ <assertion id="fa">
+ <text>If a simple bean has a public field, it must have scope @Dependent.</text>
+ <note>Check that a dependent scoped bean with a public field does work</note>
</assertion>
+
+ <assertion id="fb">
+ <text>If a simple bean with a public field declares any scope other than @Dependent, a DefinitionException is thrown by the container at deployment time.</text>
+ </assertion>
</section>
@@ -713,6 +718,9 @@
<assertion id="cb">
<text>A top-level Java class is not a simple bean if it is an interface</text>
</assertion>
+ <assertion id="cc">
+ <text>A top-level Java class can be a simple bean if it is static inner class</text>
+ </assertion>
<assertion id="da">
<text>A top-level abstract Java class is a simple bean if it is annotated @Decorator.</text>
</assertion>
@@ -873,11 +881,12 @@
<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">
+ </assertion>
+ <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">
@@ -2307,12 +2316,16 @@
</assertion>
<assertion id="b">
- <text>All client proxies must be serializable</text>
+ <text>Client proxies are used for normal scoped beans</text>
</assertion>
<assertion id="c">
<text>All client proxies must be serializable</text>
</assertion>
+
+ <assertion id="d">
+ <text>The container must guarantee that when any valid injected reference to a bean of normal scope is invoked, the invocation is always processed by the current instance of the injected bean.</text>
+ </assertion>
</section>
<section id="5.4.1" title="Unproxyable bean types">
@@ -2521,9 +2534,25 @@
<section id="5.7.2" title="Obtaining contextual instances">
<assertion id="a">
- <text>The container provides a built-in bean with bean type Manager, scope @Dependent, deployment type @Standard and binding @Current. Thus, any bean may obtain an instance of Manager by injecting it</text>
+ <text>Any bean may obtain an instance of Manager by injecting it</text>
</assertion>
+ <assertion id="aa">
+ <text>The container provides a built-in bean with bean type Manager</text>
+ </assertion>
+
+ <assertion id="ab">
+ <text>The container provides a built-in bean with scope @Dependent</text>
+ </assertion>
+
+ <assertion id="ac">
+ <text>The container provides a built-in bean with deployment type @Standard</text>
+ </assertion>
+
+ <assertion id="ad">
+ <text>The container provides a built-in bean with binding @Current.</text>
+ </assertion>
+
<assertion id="b">
<text>The application may obtain the Manager object from JNDI. The container must register an instance of Manager with name java:app/Manager in JNDI at deployment time</text>
</assertion>
@@ -3310,6 +3339,16 @@
<text>If a producer method or field declares a passivating scope and returns a non-serializable object at runtime, an IllegalProductException is thrown by the container</text>
</assertion>
+ <assertion id="ca">
+ <text>Check a producer method which declares a passivating scope and returns a serializable product works</text>
+ <note>Sanity test</note>
+ </assertion>
+
+ <assertion id="cb">
+ <text>Check a producer method which declares a passivating scope and returns a primitive product works</text>
+ <note>Sanity test</note>
+ </assertion>
+
<assertion id="d">
<text>The built-in session and conversation scopes are passivating</text>
</assertion>
@@ -3649,5 +3688,13 @@
</assertion>
</section>
+ <section id="review" title="Tests to review">
+ <assertion id="review" />
+ </section>
+
+ <section id="outdated" title="Tests which seem to be outdated">
+ <assertion id="outdated" />
+ </section>
+
</specification>
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1601 - tck/trunk/impl/src/main/resources.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-02-19 12:35:10 -0500 (Thu, 19 Feb 2009)
New Revision: 1601
Modified:
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Changed the assertions a little in section 7, Events.
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 15:34:25 UTC (rev 1600)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 17:35:10 UTC (rev 1601)
@@ -2592,22 +2592,34 @@
<section id="7.1" title="Event types and binding types">
<assertion id="a">
- <text>An event object is an instance of a concrete Java class with no type variables or wildcards</text>
+ <text>An event object is an instance of a concrete Java class with no [type variables] or wildcards</text>
</assertion>
<assertion id="b">
- <text>The event types of the event include all superclasses and interfaces of the class of the event object</text>
+ <text>An event object is an instance of a concrete Java class with no type variables or [wildcards]</text>
</assertion>
<assertion id="c">
- <text>An event binding type is a Java annotation defined as @Target({FIELD, PARAMETER}) or @Target({METHOD, FIELD, PARAMETER, TYPE}) and @Retention(RUNTIME)</text>
+ <text>The event types of the event include all superclasses and interfaces of the class of the event object</text>
</assertion>
<assertion id="d">
+ <text>An event binding type is a Java annotation defined as[@Target({FIELD, PARAMETER})] or @Target({METHOD, FIELD, PARAMETER, TYPE}) and @Retention(RUNTIME)</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>An event binding type is a Java annotation defined as @Target({FIELD, PARAMETER}) or [@Target({METHOD, FIELD, PARAMETER, TYPE})] and @Retention(RUNTIME)</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>An event binding type is a Java annotation defined as @Target({FIELD, PARAMETER}) or @Target({METHOD, FIELD, PARAMETER, TYPE}) and [@Retention(RUNTIME)]</text>
+ </assertion>
+
+ <assertion id="g">
<text>All event binding types must specify the @javax.inject.BindingType meta-annotation</text>
</assertion>
- <assertion id="e">
+ <assertion id="h">
<text>An event consumer will be notified of an event if the observed event type it specifies is one of the event types of the event, and if all the observed event bindings it specifies are event bindings of the event</text>
</assertion>
@@ -2620,9 +2632,17 @@
</assertion>
<assertion id="b">
- <text>If the type of the event object passed to fireEvent() contains type variables or wildcards, an IllegalArgumentException is thrown</text>
+ <text>If the type of the event object passed to fireEvent() contains [type variables] or wildcards, an IllegalArgumentException is thrown</text>
</assertion>
+ <assertion id="c">
+ <text>If the type of the event object passed to fireEvent() contains type variables or [wildcards], an IllegalArgumentException is thrown</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If an instance of an annotation that is not a binding type is passed to fireEvent(), an IllegalArgumentException is thrown. (Not in PRD2, but should appear in next revision)</text>
+ </assertion>
+
</section>
<section id="7.3" title="Observing events via the Observer interface">
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1600 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-19 10:34:25 -0500 (Thu, 19 Feb 2009)
New Revision: 1600
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/AbstractLifecycle.java
Log:
Better error message
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/AbstractLifecycle.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/AbstractLifecycle.java 2009-02-19 15:08:15 UTC (rev 1599)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/AbstractLifecycle.java 2009-02-19 15:34:25 UTC (rev 1600)
@@ -39,6 +39,10 @@
protected void initialize()
{
ManagerImpl manager = CurrentManager.rootManager();
+ if (manager == null)
+ {
+ throw new IllegalStateException("Manager has not been initialized, check that Bootstrap.initialize() has run");
+ }
manager.addContext(DependentContext.create());
manager.addContext(RequestContext.create());
manager.addContext(SessionContext.create());
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1599 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/realization.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-19 10:08:15 -0500 (Thu, 19 Feb 2009)
New Revision: 1599
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/realization/RealizationTest.java
Log:
mappings
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/realization/RealizationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/realization/RealizationTest.java 2009-02-19 14:47:55 UTC (rev 1598)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/realization/RealizationTest.java 2009-02-19 15:08:15 UTC (rev 1599)
@@ -31,7 +31,7 @@
};
@Test
- @SpecAssertion(section = "4.4", id = "unknown")
+ @SpecAssertion(section = "4.4.1", id = "c")
public void testRealizedBeanWithProducerMethodHasSameScope()
{
// deployBeans(Cow.class);
@@ -40,7 +40,7 @@
}
@Test
- @SpecAssertion(section = "4.4", id = "unknown")
+ @SpecAssertion(section = "4.4.1", id = "c")
public void testRealizedBeanWithProducerMethodHasDeploymentTypeOfRealizingClass()
{
// deployBeans(Cow.class);
@@ -49,7 +49,7 @@
}
@Test
- @SpecAssertion(section = "4.4", id = "unknown")
+ @SpecAssertion(section = "4.4.1", id = "c")
public void testRealizedBeanWithProducerMethodHasSameBindings()
{
// deployBeans(Cow.class);
@@ -60,7 +60,7 @@
@SuppressWarnings("unchecked")
@Test
- @SpecAssertion(section = "4.4.1", id = "unknown")
+ @SpecAssertion(section = "4.4.1", id = "c")
public void testRealizedBeanWithProducerMethodHasBindingsOfMethodAndRealizingType()
{
// deployBeans(TameCow.class);
@@ -70,7 +70,7 @@
}
@Test(groups = "broken")
- @SpecAssertion(section = "4.4", id = "unknown")
+ @SpecAssertion(section = "4.4.1", id = "c")
public void testRealizedBeanWithProducerMethodHasSameStereotypes()
{
// deployBeans(LabradorKennel.class);
@@ -79,14 +79,14 @@
}
@Test(groups = "stub")
- @SpecAssertion(section = "4.1", id = "unknown")
+ @SpecAssertion(section = "4.4.1", id = "c")
public void testRealizedBeanWithProducerMethodHasSameInterceptorBindings()
{
assert false;
}
@Test
- @SpecAssertion(section = "4.4", id = "unknown")
+ @SpecAssertion(section = "4.4.1", id = "c")
public void testRealizedBeanWithProducerFieldHasSameScope()
{
// deployBeans(Horse.class);
@@ -95,7 +95,7 @@
}
@Test
- @SpecAssertion(section = "4.4", id = "unknown")
+ @SpecAssertion(section = "4.4.1", id = "c")
public void testRealizedBeanWithProducerFieldHasDeploymentTypeOfRealizingClass()
{
// deployBeans(Horse.class);
@@ -104,7 +104,7 @@
}
@Test
- @SpecAssertion(section = "4.4", id = "unknown")
+ @SpecAssertion(section = "4.4.1", id = "c")
public void testRealizedBeanWithProducerFieldHasSameBindings()
{
// deployBeans(Horse.class);
@@ -115,7 +115,7 @@
@SuppressWarnings("unchecked")
@Test
- @SpecAssertion(section = "4.4", id = "unknown")
+ @SpecAssertion(section = "4.4.1", id = "c")
public void testRealizedBeanWithProducerFieldHasBindingsOfMethodAndRealizingType()
{
// deployBeans(TameHorse.class);
@@ -125,7 +125,7 @@
}
@Test(groups = "broken")
- @SpecAssertion(section = "4.4", id = "unknown")
+ @SpecAssertion(section = "4.4.1", id = "c")
public void testRealizedBeanWithProducerFieldHasSameStereotypes()
{
// deployBeans(Stable.class);
@@ -134,28 +134,28 @@
}
@Test(groups = "stub")
- @SpecAssertion(section = "4.4", id = "unknown")
+ @SpecAssertion(section = "4.4.1", id = "c")
public void testRealizedBeanWithProducerFieldHasSameInterceptorBindings()
{
assert false;
}
@Test(groups = "stub")
- @SpecAssertion(section = "4.4", id = "unknown")
+ @SpecAssertion(section = "4.4.1", id = "d")
public void testDisposalMethodInherited()
{
assert false;
}
@Test(groups = "stub")
- @SpecAssertion(section = "4.4", id = "unknown")
+ @SpecAssertion(section = "4.4.1", id = "d")
public void testRealizedDisposalMethodHasBindingsOfMethodAndRealizingType()
{
assert false;
}
@Test
- @SpecAssertion(section = "4.4", id = "unknown")
+ @SpecAssertion(section = "4.4.1", id = "d")
public void testObserverMethodInheritedAndHasSameBindings()
{
// deployBeans(FarmHouse.class);
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1598 - tck/trunk/impl/src/main/resources.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-19 09:47:55 -0500 (Thu, 19 Feb 2009)
New Revision: 1598
Modified:
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Map more assertions
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 14:43:45 UTC (rev 1597)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 14:47:55 UTC (rev 1598)
@@ -385,8 +385,7 @@
<section id="2.5.5" title="Default deployment type">
<assertion id="a">
- <text>The default deployment type for a bean which does not explicitly declare a deployment type depends upon its declared stereotypes - if a bean does not declare any stereotype with a declared default deployment type, then the default deployment type is
-@Production</text>
+ <text>The default deployment type for a bean which does not explicitly declare a deployment type depends upon its declared stereotypes - if a bean does not declare any stereotype with a declared default deployment type, then the default deployment type is@Production</text>
</assertion>
<assertion id="b">
@@ -404,7 +403,23 @@
<assertion id="a">
<text>Beans declared with a deployment type that is not enabled are not available to the resolution algorithms defined in Chapter 5, Lookup, dependency injection and EL resolution.</text>
</assertion>
+
+ <assertion id="b">
+ <text>If a <Deploy> element is specified, only the explicitly declared deployment types are enabled.</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The @Standard deployment type must be declared. If the @Standard deployment type is not declared, a DeploymentException is thrown by the container at deployment time.</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If no <Deploy> element is specified in any beans.xml file, only the @Standard and @Production deployment types are enabled.</text>
+ </assertion>
+ <assertion id="e">
+ <text>If the <Deploy> element is specified in more than one beans.xml document, a DeploymentException is thrown by the container at deployment time. </text>
+ </assertion>
+
</section>
<section id="2.6" title="Bean names">
@@ -601,10 +616,14 @@
<text>Stereotype annotations may be applied to a producer field</text>
</assertion>
- <assertion id="d">
- <text>The default deployment type and default scope declared by the stereotype may be overridden by the bean</text>
+ <assertion id="da">
+ <text>The default deployment type declared by the stereotype may be overridden by the bean</text>
</assertion>
+ <assertion id="db">
+ <text>The default scope declared by the stereotype may be overridden by the bean</text>
+ </assertion>
+
<assertion id="e">
<text>Multiple stereotypes may be applied to the same bean</text>
</assertion>
@@ -991,10 +1010,14 @@
<text>If the application directly calls an EJB remove method of an instance of a session bean that is a stateful session bean and declares any scope other than @Dependent, an UnsupportedOperationException is thrown</text>
</assertion>
- <assertion id="d">
- <text>If the application directly calls an EJB remove method of an instance of a session bean that is a stateful session bean and has scope @Dependent then no parameters are passed to the method by the container. Furthermore, the container ignores the instance instead of destroying it when Bean.destroy() is called, as defined in Section 6.5, "Lifecycle of stateful session beans"</text>
+ <assertion id="da">
+ <text>If the application directly calls an EJB remove method of an instance of a session bean that is a stateful session bean and has scope @Dependent then no parameters are passed to the method by the container.</text>
</assertion>
+ <assertion id="db">
+ <text>If the application directly calls an EJB remove method of an instance of a session bean that is a stateful session bean and has scope @Dependent then the container ignores the instance instead of destroying it when Bean.destroy() is called, as defined in Section 6.5, "Lifecycle of stateful session beans"</text>
+ </assertion>
+
</section>
<section id="3.3.2" title="Which EJBs are beans?">
@@ -2336,20 +2359,90 @@
<text>The javax.inject.manager.InjectionPoint.getBean() method returns the Bean object representing the bean that defines the injection point</text>
</assertion>
- <assertion id="b">
- <text>The javax.inject.manager.InjectionPoint.getType() and getBindings() methods return the declared type and bindings of the injection point. If the injection point is declared in XML, the type and bindings are determined according to Section 9.10, "Specifying bean types and bindings"</text>
+ <assertion id="ba">
+ <text>The javax.inject.manager.InjectionPoint.getType() method returns the declared type of the injection point.</text>
</assertion>
- <assertion id="c">
- <text>The javax.inject.manager.InjectionPoint.getMember() method returns the Field object in the case of field injection, the Method object in the case of method parameter injection or the Constructor object in the case of constructor parameter injection</text>
+ <assertion id="bb">
+ <text>An injection point declared in XML has it's type determined according to Section 9.10, "Specifying bean types and bindings"</text>
</assertion>
- <assertion id="d">
- <text>The javax.inject.manager.InjectionPoint.getAnnotation() and getAnnotations() methods return annotations of the field in the case of field injection, or annotations of the parameter in the case of method parameter or constructor parameter injection. getAnnotation() returns a null value if no annotation of the given type exists at the injection point</text>
+ <assertion id="bc">
+ <text>The javax.inject.manager.InjectionPoint.getBindings() method returns the declared bindings of the injection point.</text>
</assertion>
+
+ <assertion id="bd">
+ <text>An injection point declared in XML has it's bindings determined according to Section 9.10, "Specifying bean types and bindings"</text>
+ </assertion>
+
+ <assertion id="ca">
+ <text>The javax.inject.manager.InjectionPoint.getMember() method returns the Field object in the case of field injection</text>
+ </assertion>
+
+ <assertion id="cb">
+ <text>The javax.inject.manager.InjectionPoint.getMember() method returns the Method object in the case of method parameter injection</text>
+ </assertion>
+
+ <assertion id="cc">
+ <text>The javax.inject.manager.InjectionPoint.getMember() method returns the Constructor object in the case of constructor parameter injection</text>
+ </assertion>
+
+ <assertion id="da">
+ <text>The javax.inject.manager.InjectionPoint.getAnnotation() method returns annotations of the field in the case of field injection</text>
+ </assertion>
+
+ <assertion id="db">
+ <text>The javax.inject.manager.InjectionPoint.getAnnotation() method returns annotations of the parameter in the case of method parameter</text>
+ </assertion>
+
+ <assertion id="dc">
+ <text>The javax.inject.manager.InjectionPoint.getAnnotation() method returns annotations annotations of the parameter in the case of constructor parameter injection.</text>
+ </assertion>
+
+ <assertion id="dd">
+ <text>The javax.inject.manager.InjectionPoint.getAnnotations() method returns annotations of the field in the case of field injection</text>
+ </assertion>
+
+ <assertion id="de">
+ <text>The javax.inject.manager.InjectionPoint.getAnnotations() method returns annotations of the parameter in the case of method parameter</text>
+ </assertion>
+
+ <assertion id="df">
+ <text>The javax.inject.manager.InjectionPoint.getAnnotations() method returns annotations annotations of the parameter in the case of constructor parameter injection.</text>
+ </assertion>
+
+ <assertion id="dg">
+ <text>getAnnotation() returns a null value if no annotation of the given type exists at the field injection point</text>
+ </assertion>
+
+ <assertion id="dh">
+ <text>getAnnotation() returns a null value if no annotation of the given type exists at the method parameter injection point</text>
+ </assertion>
+
+ <assertion id="di">
+ <text>getAnnotation() returns a null value if no annotation of the given type exists at the constructor injection point</text>
+ </assertion>
+
</section>
<section id="5.6.1" title="Injecting InjectionPoint">
+
+ <assertion id="za">
+ <text>The container must provide a bean with deployment type @Standard.</text>
+ </assertion>
+
+ <assertion id="zb">
+ <text>The container must provide a bean with scope @Dependent.</text>
+ </assertion>
+
+ <assertion id="zc">
+ <text>The container must provide a bean with bean type InjectionPoint.</text>
+ </assertion>
+
+ <assertion id="zd">
+ <text>The container must provide a bean with binding @Current.</text>
+ </assertion>
+
<assertion id="a">
<text>Whenever a @Dependent scoped object is instantiated by the container for injection into a second bean, any injection point of type InjectionPoint and binding @Current receives an instance of InjectionPoint that represents the injection point of the second bean</text>
</assertion>
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1597 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck: integration/context/request and 15 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-19 09:43:45 -0500 (Thu, 19 Feb 2009)
New Revision: 1597
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/application/ApplicationContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/request/RequestContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/session/SessionContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/binding/BindingDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/DeploymentTypeDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/broken/BrokenDeploymentTypeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/broken/tooMany/TooManyDeploymentTypesTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/custom/CustomDeploymentTypeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/defaultDeploymentType/DefaultDeploymentTypeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/name/NameDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/scope/ScopeDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/EnterpriseBeanRemoveMethodTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/InitializerMethodTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injectionpoint/InjectionPointTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/typesafe/ResolutionByTypeTest.java
Log:
Map more assertions
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/application/ApplicationContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/application/ApplicationContextTest.java 2009-02-19 13:39:49 UTC (rev 1596)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/application/ApplicationContextTest.java 2009-02-19 14:43:45 UTC (rev 1597)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.integration.context.application;
-import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.testng.annotations.Test;
/**
@@ -11,81 +11,50 @@
public class ApplicationContextTest extends AbstractDeclarativeTest
{
- /**
- * The application scope is active during the service() method of any servlet
- * in the web application.
- */
@Test(groups = { "stub", "contexts", "servlet", "integration" })
- @SpecAssertion(section = "8.5.3", id = "unknown")
+ @SpecAssertion(section = "8.5.3", id = "a")
public void testApplicationScopeActiveDuringServiceMethod()
{
assert false;
}
- /**
- * The application scope is active during any Java EE web service invocation.
- */
@Test(groups = { "stub", "contexts", "webservice", "integration" })
- @SpecAssertion(section = "8.5.3", id = "unknown")
+ @SpecAssertion(section = "8.5.3", id = "c")
public void testApplicationScopeActiveDuringWebSericeInvocation()
{
assert false;
}
- /**
- * The application scope is also active during any remote method invocation
- * of any EJB bean, during any call to an EJB timeout method and during
- * message delivery to any EJB message driven bean.
- */
@Test(groups = { "stub", "contexts", "ejb3", "integration" })
- @SpecAssertion(section = "8.5.3", id = "unknown")
+ @SpecAssertion(section = "8.5.3", id = "e")
public void testApplicationScopeActiveDuringRemoteMethodInvocationOfEjb()
{
assert false;
}
- /**
- * The application scope is also active during any remote method invocation
- * of any EJB bean, during any call to an EJB timeout method and during
- * message delivery to any EJB message driven bean.
- */
@Test(groups = { "stub", "contexts", "ejb3", "integration" })
- @SpecAssertion(section = "8.5.3", id = "unknown")
+ @SpecAssertion(section = "8.5.3", id = "f")
public void testApplicationScopeActiveDuringCallToEjbTimeoutMethod()
{
assert false;
}
- /**
- * The application scope is also active during any remote method invocation
- * of any EJB bean, during any call to an EJB timeout method and during
- * message delivery to any EJB message driven bean.
- */
@Test(groups = { "stub", "contexts", "ejb3", "integration" })
- @SpecAssertion(section = "8.5.3", id = "unknown")
+ @SpecAssertion(section = "8.5.3", id = "g")
public void testApplicationScopeActiveDuringEjbMessageDelivery()
{
assert false;
}
- /**
- * The application context is shared between all servlet requests, web
- * service invocations, EJB remote method invocations, EJB timeouts and
- * message deliveries to message driven beans that execute within the same
- * application
- */
@Test(groups = { "stub", "contexts", "ejb3", "integration" })
- @SpecAssertion(section = "8.5.3", id = "unknown")
+ @SpecAssertion(section = "8.5.3", id = "h")
public void testApplicationContextSharedBetweenInvokationsInApplication()
{
assert false;
}
- /**
- * The application context is destroyed when the application is undeployed.
- */
@Test(groups = { "stub", "contexts", "integration" })
- @SpecAssertion(section = "8.5.3", id = "unknown")
+ @SpecAssertion(section = "8.5.3", id = "n")
public void testApplicationScopeDestroyedWhenApplicationIsUndeployed()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/request/RequestContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/request/RequestContextTest.java 2009-02-19 13:39:49 UTC (rev 1596)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/request/RequestContextTest.java 2009-02-19 14:43:45 UTC (rev 1597)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.integration.context.request;
+import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
-import org.hibernate.tck.annotations.SpecAssertion;
import org.testng.annotations.Test;
/**
@@ -16,7 +16,7 @@
* the web application.
*/
@Test(groups = { "stub", "contexts", "servlet", "integration" })
- @SpecAssertion(section = "8.5.1", id = "unknown")
+ @SpecAssertion(section = "8.5.1", id = "a")
public void testRequestScopeActiveDuringServiceMethod()
{
assert false;
@@ -27,7 +27,7 @@
* the Servlet service() method returns.
*/
@Test(groups = { "stub", "contexts", "servlet", "integration" })
- @SpecAssertion(section = "8.5.1", id = "unknown")
+ @SpecAssertion(section = "8.5.1", id = "c")
public void testRequestScopeIsDestroyedAfterServiceMethod()
{
assert false;
@@ -37,7 +37,7 @@
* The request scope is active during any Java EE web service invocation.
*/
@Test(groups = { "stub", "contexts", "webservice", "integration" })
- @SpecAssertion(section = "8.5.1", id = "unknown")
+ @SpecAssertion(section = "8.5.1", id = "d")
public void testRequestScopeActiveDuringWebSericeInvocation()
{
assert false;
@@ -48,7 +48,7 @@
* completes
*/
@Test(groups = { "stub", "contexts", "webservice", "integration" })
- @SpecAssertion(section = "8.5.1", id = "unknown")
+ @SpecAssertion(section = "8.5.1", id = "e")
public void testRequestScopeIsDestroyedAfterWebServiceInvocation()
{
assert false;
@@ -60,7 +60,7 @@
* to any EJB message driven bean.
*/
@Test(groups = { "stub", "contexts", "ejb3", "integration" })
- @SpecAssertion(section = "8.5.1", id = "unknown")
+ @SpecAssertion(section = "8.5.1", id = "h")
public void testRequestScopeActiveDuringRemoteMethodInvocationOfEjb()
{
assert false;
@@ -72,7 +72,7 @@
* to any EJB message driven bean.
*/
@Test(groups = { "stub", "contexts", "ejb3", "integration" })
- @SpecAssertion(section = "8.5.1", id = "unknown")
+ @SpecAssertion(section = "8.5.1", id = "i")
public void testRequestScopeActiveDuringCallToEjbTimeoutMethod()
{
assert false;
@@ -84,7 +84,7 @@
* to any EJB message driven bean.
*/
@Test(groups = { "stub", "contexts", "ejb3", "integration" })
- @SpecAssertion(section = "8.5.1", id = "unknown")
+ @SpecAssertion(section = "8.5.1", id = "j")
public void testRequestScopeActiveDuringEjbMessageDelivery()
{
assert false;
@@ -95,7 +95,7 @@
* timeout or message delivery completes.
*/
@Test(groups = { "stub", "contexts", "ejb3", "integration" })
- @SpecAssertion(section = "8.5.1", id = "unknown")
+ @SpecAssertion(section = "8.5.1", id = "k")
public void testRequestScopeDestroyedAfterRemoteMethodInvocationOfEjb()
{
assert false;
@@ -106,7 +106,7 @@
* timeout or message delivery completes.
*/
@Test(groups = { "stub", "contexts", "ejb3", "integration" })
- @SpecAssertion(section = "8.5.1", id = "unknown")
+ @SpecAssertion(section = "8.5.1", id = "l")
public void testRequestScopeDestroyedAfterCallToEjbTimeoutMethod()
{
assert false;
@@ -117,7 +117,7 @@
* timeout or message delivery completes.
*/
@Test(groups = { "stub", "contexts", "ejb3", "integration" })
- @SpecAssertion(section = "8.5.1", id = "unknown")
+ @SpecAssertion(section = "8.5.1", id = "m")
public void testRequestScopeDestroyedAfterEjbMessageDelivery()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/session/SessionContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/session/SessionContextTest.java 2009-02-19 13:39:49 UTC (rev 1596)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/session/SessionContextTest.java 2009-02-19 14:43:45 UTC (rev 1597)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.integration.context.session;
-import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.testng.annotations.Test;
/**
@@ -11,37 +11,32 @@
public class SessionContextTest extends AbstractDeclarativeTest
{
- /**
- * The session scope is active during the service() method of any servlet in
- * the web application
- */
@Test(groups = { "stub", "contexts", "servlet", "integration" })
- @SpecAssertion(section = "8.5.2", id = "unknown")
+ @SpecAssertion(section = "8.5.2", id = "a")
public void testSessionScopeActiveDuringServiceMethod()
{
assert false;
}
- /**
- * The session context is shared between all servlet requests that occur in
- * the same HTTP servlet session
- */
@Test(groups = { "stub", "contexts", "servlet", "integration" })
- @SpecAssertion(section = "8.5.2", id = "unknown")
+ @SpecAssertion(section = "8.5.2", id = "c")
public void testSessionContextSharedBetweenServletRequestsInSameHttpSession()
{
assert false;
}
- /**
- * The session context is destroyed when the HTTPSession is invalidated or
- * times out.
- */
@Test(groups = { "stub", "contexts", "integration" })
- @SpecAssertion(section = "8.5.2", id = "unknown")
- public void testSessionContextDestroyedWhenHttpSessionInvalidatedOrTimesOut()
+ @SpecAssertion(section = "8.5.2", id = "d")
+ public void testSessionContextDestroyedWhenHttpSessionInvalidated()
{
assert false;
}
+
+ @Test(groups = { "stub", "contexts", "integration" })
+ @SpecAssertion(section = "8.5.2", id = "e")
+ public void testSessionContextDestroyedWhenHttpSessionTimesOut()
+ {
+ assert false;
+ }
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/binding/BindingDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/binding/BindingDefinitionTest.java 2009-02-19 13:39:49 UTC (rev 1596)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/binding/BindingDefinitionTest.java 2009-02-19 14:43:45 UTC (rev 1597)
@@ -9,9 +9,9 @@
import javax.inject.Production;
import javax.inject.manager.Bean;
-import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.jboss.jsr299.tck.impl.packaging.Artifact;
import org.jboss.jsr299.tck.literals.CurrentBinding;
import org.testng.annotations.Test;
@@ -150,7 +150,7 @@
}
@Test(groups = { "injection", "producerMethod" })
- @SpecAssertion(section = "2.3.5", id = "unknown")
+ @SpecAssertion(section = "2.3.5", id = "a")
public void testFieldInjectedFromProducerMethod() throws Exception
{
Barn barn = getCurrentManager().resolveByType(Barn.class).iterator().next().create(new MockCreationalContext<Barn>());
@@ -192,14 +192,14 @@
}
@Test(groups = { "stub", "injection", "webbeansxml" })
- @SpecAssertion(section = "2.3.6", id = "unknown")
+ @SpecAssertion(section = "2.3.6", id = "e")
public void testMethodWithBindingAnnotationsOnParametersDeclaredInXml()
{
assert false;
}
@Test(groups = { "stub", "injection", "webbeansxml" })
- @SpecAssertion(section = "2.3.6", id = "unknown")
+ @SpecAssertion(section = "2.3.6", id = "f")
public void testMethodWithBindingAnnotationsOnParametersDeclaredInXmlIgnoresAnnotations()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/DeploymentTypeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/DeploymentTypeDefinitionTest.java 2009-02-19 13:39:49 UTC (rev 1596)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/DeploymentTypeDefinitionTest.java 2009-02-19 14:43:45 UTC (rev 1597)
@@ -9,9 +9,9 @@
import javax.inject.UnsatisfiedDependencyException;
import javax.inject.manager.Bean;
-import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.testng.annotations.Test;
/**
@@ -147,8 +147,8 @@
* type declared by stereotypes are ignored.
*/
@Test(groups = { "deploymentType" })
- @SpecAssertions( { @SpecAssertion(section = "2.5.5", id = "unknown"),
- @SpecAssertion(section = "2.7.2", id = "unknown"),
+ @SpecAssertions( { @SpecAssertion(section = "2.5.5", id = "c"),
+ @SpecAssertion(section = "2.7.2", id = "da"),
@SpecAssertion(section = "4.1", id = "d") })
public void testWebBeanDeploymentTypeOverridesStereotype()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/broken/BrokenDeploymentTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/broken/BrokenDeploymentTypeTest.java 2009-02-19 13:39:49 UTC (rev 1596)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/broken/BrokenDeploymentTypeTest.java 2009-02-19 14:43:45 UTC (rev 1597)
@@ -10,13 +10,13 @@
*
* Spec version: PRD2
*/
-@Test(alwaysRun=true)
+@Test
public class BrokenDeploymentTypeTest extends AbstractDeclarativeTest
{
@SuppressWarnings("unchecked")
@Test(expectedExceptions=DeploymentException.class, groups="broken")
- @SpecAssertion(section="2.5.6", id = "unknown")
+ @SpecAssertion(section="2.5.6", id = "c")
public void testStandardMustBeDeclared()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/broken/tooMany/TooManyDeploymentTypesTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/broken/tooMany/TooManyDeploymentTypesTest.java 2009-02-19 13:39:49 UTC (rev 1596)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/broken/tooMany/TooManyDeploymentTypesTest.java 2009-02-19 14:43:45 UTC (rev 1597)
@@ -38,7 +38,7 @@
* DefinitionException is thrown by the container at deployment time.
*/
@Test(groups = { "deploymentType"})
- @SpecAssertion(section = "2.5.3", id = "unknown")
+ @SpecAssertion(section = "2.5.3", id = "d")
public void testTooManyDeploymentTypes()
{
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/custom/CustomDeploymentTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/custom/CustomDeploymentTypeTest.java 2009-02-19 13:39:49 UTC (rev 1596)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/custom/CustomDeploymentTypeTest.java 2009-02-19 14:43:45 UTC (rev 1597)
@@ -22,8 +22,7 @@
@SuppressWarnings("unchecked")
@Test
@SpecAssertions({
- @SpecAssertion(section = "2.5.6", id = "unknown"),
- @SpecAssertion(section = "2.5.7", id = "unknown")
+ @SpecAssertion(section = "2.5.6", id = "b")
})
public void testCustomDeploymentTypes()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/defaultDeploymentType/DefaultDeploymentTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/defaultDeploymentType/DefaultDeploymentTypeTest.java 2009-02-19 13:39:49 UTC (rev 1596)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/defaultDeploymentType/DefaultDeploymentTypeTest.java 2009-02-19 14:43:45 UTC (rev 1597)
@@ -7,7 +7,6 @@
import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.jboss.jsr299.tck.impl.packaging.Artifact;
-import org.jboss.jsr299.tck.impl.packaging.Classes;
import org.testng.annotations.Test;
/**
@@ -21,8 +20,7 @@
@Test
@SpecAssertions({
- @SpecAssertion(section = "2.5.6", id = "unknown"),
- @SpecAssertion(section = "2.5.7", id = "unknown")
+ @SpecAssertion(section = "2.5.6", id = "unknown")
})
public void testDefaultEnabledDeploymentTypes()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/name/NameDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/name/NameDefinitionTest.java 2009-02-19 13:39:49 UTC (rev 1596)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/name/NameDefinitionTest.java 2009-02-19 14:43:45 UTC (rev 1597)
@@ -6,9 +6,9 @@
import javax.inject.DefinitionException;
import javax.inject.manager.Bean;
-import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.testng.annotations.Test;
/**
@@ -99,7 +99,7 @@
@Test
@SpecAssertions({
@SpecAssertion(section= "2.6.3", id = "a"),
- @SpecAssertion(section = "3.2.7", id = "unknown")
+ @SpecAssertion(section = "3.2.8", id = "a")
})
public void testDefaultNamed()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/scope/ScopeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/scope/ScopeDefinitionTest.java 2009-02-19 13:39:49 UTC (rev 1596)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/scope/ScopeDefinitionTest.java 2009-02-19 14:43:45 UTC (rev 1597)
@@ -6,9 +6,9 @@
import javax.inject.DefinitionException;
import javax.inject.manager.Bean;
-import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.testng.annotations.Test;
/**
@@ -156,7 +156,7 @@
@Test
@SpecAssertions({
- @SpecAssertion(section = "2.7.2", id = "d"),
+ @SpecAssertion(section = "2.7.2", id = "db"),
@SpecAssertion(section = "4.1", id = "h")
})
public void testWebBeanScopeTypeOverridesStereotype()
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/EnterpriseBeanRemoveMethodTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/EnterpriseBeanRemoveMethodTest.java 2009-02-19 13:39:49 UTC (rev 1596)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/EnterpriseBeanRemoveMethodTest.java 2009-02-19 14:43:45 UTC (rev 1597)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.unit.implementation.enterprise;
+import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
-import org.hibernate.tck.annotations.SpecAssertion;
import org.testng.annotations.Test;
/**
@@ -24,7 +24,7 @@
* passed to the method by the Web Bean manager
*/
@Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
- @SpecAssertion(section = "3.3.1", id = "unknown")
+ @SpecAssertion(section = "3.3.1", id = "da")
public void applicationMayCallRemoveMethodOnDependentScopedSessionEnterpriseBeansButNoParametersArePassed()
{
assert false;
@@ -36,7 +36,7 @@
* scope other than @Dependent, an UnsupportedOperationException is thrown.
*/
@Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" }, expectedExceptions = UnsupportedOperationException.class)
- @SpecAssertion(section = "3.3.1", id = "unknown")
+ @SpecAssertion(section = "3.3.1", id = "c")
public void applicationCannotCallRemoveMethodOnNonDependentScopedSessionEnterpriseBean()
{
assert false;
@@ -49,7 +49,7 @@
* destroying it
*/
@Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle", "stub" })
- @SpecAssertion(section = "3.3.1", id = "unknown")
+ @SpecAssertion(section = "3.3.1", id = "db")
public void applicationMayCallRemoveMethodOnDependentScopedSessionEnterpriseBeansButInstanceIsNotDestroyed()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/InitializerMethodTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/InitializerMethodTest.java 2009-02-19 13:39:49 UTC (rev 1596)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/initializer/InitializerMethodTest.java 2009-02-19 14:43:45 UTC (rev 1597)
@@ -3,9 +3,9 @@
import javax.inject.DefinitionException;
import javax.inject.manager.Bean;
-import org.jboss.jsr299.tck.AbstractDeclarativeTest;
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.testng.annotations.Test;
@@ -127,7 +127,7 @@
}
@Test(groups = { "stub", "initializerMethod", "webbeansxml" })
- @SpecAssertion(section = "3.9.2", id = "unknown")
+ @SpecAssertion(section = "3.9.2", id = "review")
public void testBeanHasAllInitializerMethodsDeclaredInJavaAndXml()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java 2009-02-19 13:39:49 UTC (rev 1596)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java 2009-02-19 14:43:45 UTC (rev 1597)
@@ -12,9 +12,9 @@
import javax.inject.Standard;
import javax.inject.manager.Bean;
-import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.jboss.jsr299.tck.literals.CurrentBinding;
import org.testng.annotations.Test;
@@ -102,7 +102,7 @@
@Test(groups = "producerField")
@SpecAssertions({
@SpecAssertion(section = "3.5", id = "review"),
- @SpecAssertion(section = "2.3.1", id = "unknown")
+ @SpecAssertion(section = "2.3.1", id = "a")
})
public void testDefaultBindingType()
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldLifecycleTest.java 2009-02-19 13:39:49 UTC (rev 1596)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldLifecycleTest.java 2009-02-19 14:43:45 UTC (rev 1597)
@@ -9,9 +9,9 @@
import javax.inject.Production;
import javax.inject.Standard;
-import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.testng.annotations.Test;
/**
@@ -43,7 +43,7 @@
* value.
*/
@Test(groups = { "producerField" })
- @SpecAssertion(section = "5.6", id = "unknown")
+ @SpecAssertion(section = "6.8", id = "unknown")
public void testProducerStaticFieldBean()
{
deployBeans(StaticTarantulaProducer.class, TarantulaConsumer.class);
@@ -121,9 +121,8 @@
*/
@Test(groups = { "producerField" })
@SpecAssertions({
- @SpecAssertion(section = "3.5", id = "unknown"),
- @SpecAssertion(section = "6.8", id = "unknown"),
- @SpecAssertion(section = "8.3", id = "unknown")
+ @SpecAssertion(section = "3.5", id = "d"),
+ @SpecAssertion(section = "6.8", id = "unknown")
})
public void testProducerFieldReturnsNullIsDependent() throws Exception
{
@@ -148,7 +147,7 @@
*/
@Test(groups = { "producerField" }, expectedExceptions = IllegalProductException.class)
@SpecAssertions({
- @SpecAssertion(section = "3.5", id = "unknown"),
+ @SpecAssertion(section = "3.5", id = "e"),
@SpecAssertion(section = "6.8", id = "unknown")
})
public void testProducerFieldReturnsNullIsNotDependent() throws Exception
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodLifecycleTest.java 2009-02-19 13:39:49 UTC (rev 1596)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodLifecycleTest.java 2009-02-19 14:43:45 UTC (rev 1597)
@@ -8,9 +8,9 @@
import javax.inject.IllegalProductException;
import javax.inject.manager.Bean;
-import org.jboss.jsr299.tck.AbstractDeclarativeTest;
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.testng.annotations.Test;
@@ -75,21 +75,13 @@
}
@Test(groups = { "stub", "disposalMethod", "beanLifecycle" })
- @SpecAssertion(section = "3.3.5", id = "unknown")
+ @SpecAssertion(section = "6.7", id = "unknown")
public void testDisposalMethodCalled()
{
// TODO Placeholder
assert false;
}
- @Test(groups = { "stub", "disposalMethod", "beanLifecycle" })
- @SpecAssertion(section = "3.3.5", id = "unknown")
- public void testDisposalMethodHasParametersInjected()
- {
- // TODO Placeholder
- assert false;
- }
-
@Test(groups = { "producerMethod", "broken" })
@SpecAssertions( { @SpecAssertion(section = "3.4", id = "unknown"), @SpecAssertion(section = "B.1", id = "unknown"), @SpecAssertion(section = "7.3", id = "unknown") })
public void testProducerMethodReturnsNullIsDependent() throws Exception
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injectionpoint/InjectionPointTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injectionpoint/InjectionPointTest.java 2009-02-19 13:39:49 UTC (rev 1596)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injectionpoint/InjectionPointTest.java 2009-02-19 14:43:45 UTC (rev 1597)
@@ -30,8 +30,8 @@
import javax.inject.manager.Bean;
import javax.inject.manager.InjectionPoint;
+import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
-import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.literals.CurrentBinding;
import org.testng.annotations.Test;
@@ -46,7 +46,7 @@
{
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.6", id = "unknown")
+ @SpecAssertion(section = "5.6", id = "a")
public void testGetBean()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -70,7 +70,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.6", id = "unknown")
+ @SpecAssertion(section = "5.6", id = "ba")
public void testGetType()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -91,7 +91,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.6", id = "unknown")
+ @SpecAssertion(section = "5.6", id = "bc")
public void testGetBindingTypes()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -114,7 +114,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.6", id = "unknown")
+ @SpecAssertion(section = "5.6", id = "ca")
public void testGetMemberField()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -135,7 +135,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.6", id = "unknown")
+ @SpecAssertion(section = "5.6", id = "cb")
public void testGetMemberMethod()
{
deployBeans(MethodInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -161,7 +161,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.6", id = "unknown")
+ @SpecAssertion(section = "5.6", id = "cc")
public void testGetMemberConstructor()
{
deployBeans(ConstructorInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -187,7 +187,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.6", id = "unknown")
+ @SpecAssertion(section = "5.6", id = "da")
public void testGetAnnotation()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -208,7 +208,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.6", id = "unknown")
+ @SpecAssertion(section = "5.6", id = "dd")
public void testGetAnnotations()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -232,7 +232,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.6", id = "unknown")
+ @SpecAssertion(section = "5.6", id = "za")
public void testStandardDeployment() throws Exception
{
deployBeans();
@@ -251,7 +251,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.6", id = "unknown")
+ @SpecAssertion(section = "5.6", id = "zb")
public void testDependentScope() throws Exception
{
deployBeans();
@@ -270,7 +270,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.6", id = "unknown")
+ @SpecAssertion(section = "5.6", id = "zc")
public void testApiTypeInjectionPoint()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
@@ -291,7 +291,7 @@
}
@Test(groups = { "injectionPoint" })
- @SpecAssertion(section = "5.6", id = "unknown")
+ @SpecAssertion(section = "5.6", id = "zd")
public void testCurrentBinding()
{
deployBeans(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/typesafe/ResolutionByTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/typesafe/ResolutionByTypeTest.java 2009-02-19 13:39:49 UTC (rev 1596)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/typesafe/ResolutionByTypeTest.java 2009-02-19 14:43:45 UTC (rev 1597)
@@ -11,9 +11,9 @@
import javax.inject.TypeLiteral;
import javax.inject.manager.Bean;
-import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.jboss.jsr299.tck.literals.CurrentBinding;
import org.testng.annotations.Test;
@@ -100,7 +100,7 @@
@Test(groups="injection")
@SpecAssertions({
- @SpecAssertion(section = "2.3.5", id = "unknown"),
+ @SpecAssertion(section = "2.3.5", id = "b"),
@SpecAssertion(section = "5.9.2", id = "unknown")
})
public void testAllBindingTypesSpecifiedForResolutionMustAppearOnWebBean()
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1596 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-02-19 08:39:49 -0500 (Thu, 19 Feb 2009)
New Revision: 1596
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/DogAgent.java
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/Pomeranian.java
Log:
Minor fixes and marked all tests broken since required feature is broken.
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/DogAgent.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/DogAgent.java 2009-02-19 07:41:39 UTC (rev 1595)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/DogAgent.java 2009-02-19 13:39:49 UTC (rev 1596)
@@ -2,6 +2,7 @@
import javax.annotation.Named;
import javax.annotation.Resource;
+import javax.annotation.security.RunAs;
import javax.ejb.EJBException;
import javax.ejb.Local;
import javax.ejb.Stateless;
@@ -15,6 +16,7 @@
@Stateless
@Local(Agent.class)
@TransactionManagement(BEAN)
+@RunAs("Bubba")
@Named
public class DogAgent implements Agent
{
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 07:41:39 UTC (rev 1595)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java 2009-02-19 13:39:49 UTC (rev 1596)
@@ -20,6 +20,7 @@
import static org.jboss.jsr299.tck.impl.packaging.PackagingType.EAR;
import java.lang.annotation.Annotation;
+import java.math.BigInteger;
import java.util.Set;
import javax.event.Observer;
@@ -68,22 +69,35 @@
public void testTransactionalObserverNotifiedImmediatelyWhenNoTransactionInProgress()
{
PomeranianInterface dog = (PomeranianInterface) getCurrentManager().getInstanceByName("Teddy");
+ dog.setCorrectContext(false);
+ dog.setCorrectTransactionState(false);
Agent dogAgent = getCurrentManager().getInstanceByType(Agent.class);
- dogAgent.sendOutsideTransaction("event");
+ dogAgent.sendOutsideTransaction(BigInteger.TEN);
+ assert dog.isCorrectContext();
+ assert dog.isCorrectTransactionState();
}
- @Test(groups = { "events", "integration" })
+ @Test(groups = { "events", "integration", "broken" })
@SpecAssertion(section = "7.5.6", id = "unknown")
public void testAfterTransactionCompletionObserver()
{
+ PomeranianInterface dog = (PomeranianInterface) getCurrentManager().getInstanceByName("Teddy");
+ dog.setCorrectContext(false);
+ dog.setCorrectTransactionState(false);
+ assert !getCurrentManager().resolveObservers("event").isEmpty();
Agent dogAgent = getCurrentManager().getInstanceByType(Agent.class);
dogAgent.sendInTransaction("event");
+ assert dog.isCorrectContext();
+ assert dog.isCorrectTransactionState();
}
- @Test(groups = { "events", "integration" })
+ @Test(groups = { "events", "integration", "broken" })
@SpecAssertion(section = "7.5.6", id = "unknown")
public void testAfterTransactionSuccessObserver()
{
+ PomeranianInterface dog = (PomeranianInterface) getCurrentManager().getInstanceByName("Teddy");
+ dog.setCorrectContext(false);
+ dog.setCorrectTransactionState(false);
Agent dogAgent = getCurrentManager().getInstanceByType(Agent.class);
dogAgent.sendInTransaction(new Integer(4));
}
@@ -92,6 +106,9 @@
@SpecAssertion(section = "7.5.6", id = "unknown")
public void testAfterTransactionFailureObserver()
{
+ PomeranianInterface dog = (PomeranianInterface) getCurrentManager().getInstanceByName("Teddy");
+ dog.setCorrectContext(false);
+ dog.setCorrectTransactionState(false);
getCurrentManager().fireEvent(new Float(4.0));
}
@@ -143,6 +160,8 @@
getCurrentManager().fireEvent(event);
PomeranianInterface dog = (PomeranianInterface) getCurrentManager().getInstanceByName("Teddy");
+ dog.setCorrectContext(false);
+ dog.setCorrectTransactionState(false);
}
@Test(groups = { "stub", "events", "integration" })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/Pomeranian.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/Pomeranian.java 2009-02-19 07:41:39 UTC (rev 1595)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/Pomeranian.java 2009-02-19 13:39:49 UTC (rev 1596)
@@ -3,6 +3,7 @@
import static javax.ejb.TransactionManagementType.BEAN;
import static javax.transaction.Status.STATUS_COMMITTED;
import static javax.transaction.Status.STATUS_ROLLEDBACK;
+import static javax.transaction.Status.STATUS_NO_TRANSACTION;
import java.math.BigInteger;
@@ -26,7 +27,7 @@
@Tame
@Named("Teddy")
@TransactionManagement(BEAN)
-class Pomeranian implements PomeranianInterface
+public class Pomeranian implements PomeranianInterface
{
@Resource
private UserTransaction transaction;
@@ -59,6 +60,10 @@
{
setCorrectContext(true);
}
+ else
+ {
+ throw new EJBException("Wrong principal: " + context.getCallerPrincipal().getName());
+ }
}
catch (SystemException e)
{
@@ -108,7 +113,26 @@
public void observeBigIntegerEvent(@Observes BigInteger event)
{
-
+ try
+ {
+ if (transaction.getStatus() == STATUS_NO_TRANSACTION)
+ {
+ setCorrectTransactionState(true);
+ }
+ else
+ {
+ throw new EJBException("Transaction " + transaction + " is not in expected state");
+ }
+
+ if (context.getCallerPrincipal().getName().equals("Bubba"))
+ {
+ setCorrectContext(true);
+ }
+ }
+ catch (SystemException e)
+ {
+ throw new EJBException("Failed to detect transaction status", e);
+ }
}
public boolean isCorrectContext()
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1595 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/integration/context/passivating and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-02-19 02:41:39 -0500 (Thu, 19 Feb 2009)
New Revision: 1595
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/ContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/passivating/PassivatingContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/EnterpriseBeanSpecializationTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injection/InjectionTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
matched a bunch more tests, more chapter 5 assertions
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/ContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/ContextTest.java 2009-02-19 01:54:31 UTC (rev 1594)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/ContextTest.java 2009-02-19 07:41:39 UTC (rev 1595)
@@ -26,25 +26,15 @@
*/
public class ContextTest
{
- /**
- * The built-in contexts do not propagate across remote method invocations or
- * to asynchronous processes such as JMS message listeners or EJB timer
- * service timeouts
- */
@Test(groups = { "stub", "contexts", "integration" })
- @SpecAssertion(section = "8.5", id = "unknown")
+ @SpecAssertion(section = "8.5", id = "c")
public void testBuiltInNormalScopedContextsDoNotPropagateAcrossRemoteMethodInvocations()
{
assert false;
}
- /**
- * The built-in contexts do not propagate across remote method invocations or
- * to asynchronous processes such as JMS message listeners or EJB timer
- * service timeouts
- */
@Test(groups = { "stub", "contexts", "integration" })
- @SpecAssertion(section = "8.5", id = "unknown")
+ @SpecAssertion(section = "8.5", id = "c")
public void testBuiltInNormalScopedContextsDoNotPropagateAcrossAsynchronousMethodInvocations()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/passivating/PassivatingContextTest.java 2009-02-19 01:54:31 UTC (rev 1594)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/context/passivating/PassivatingContextTest.java 2009-02-19 07:41:39 UTC (rev 1595)
@@ -16,42 +16,22 @@
*/
public class PassivatingContextTest extends AbstractDeclarativeTest
{
-
- /**
- * EJB local objects are serializable. Therefore, an enterprise Web Bean may
- * declare any passivating scope.
- */
@Test(groups = { "contexts", "passivation", "enterpriseBean", "integration" })
- @SpecAssertion(section = "8.4", id = "unknown")
+ @SpecAssertion(section = "8.4", id = "a")
public void testEJBWebBeanCanDeclarePassivatingScope()
{
deployBeans(Turku.class);
}
- /**
- * The Web Bean manager must guarantee that JMS endpoint proxy objects are
- * serializable.
- */
@Test(groups = { "stub", "contexts", "passivation", "jms" })
- @SpecAssertion(section = "8.4", id = "unknown")
+ @SpecAssertion(section = "8.4", id = "u")
public void testJMSEndpointProxyIsSerializable()
{
assert false;
}
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- *
- * @throws NoSuchMethodException
- * @throws SecurityException
- */
@Test(groups = { "contexts", "passivation", "integration", "broken" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4", id = "unknown")
+ @SpecAssertion(section = "8.4", id = "p")
public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails() throws SecurityException, NoSuchMethodException
{
deployBeans(CityProducer2.class, Maarianhamina_Broken.class);
@@ -64,23 +44,14 @@
*/
// TODO requires an EJB instance
@Test(groups = { "contexts", "passivation", "stub", "integration" })
- @SpecAssertion(section = "8.4", id = "unknown")
+ @SpecAssertion(section = "8.4", id = "review")
public void testStatefulEJBIsSerializedWhenPassivatedByEJBContainer() throws IOException, ClassNotFoundException
{
assert false;
}
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- *
- */
@Test(groups = { "contexts", "passivation", "stub", "integration" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4", id = "unknown")
+ @SpecAssertion(section = "8.4", id = "p")
public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails() throws Exception
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/EnterpriseBeanSpecializationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/EnterpriseBeanSpecializationTest.java 2009-02-19 01:54:31 UTC (rev 1594)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/inheritance/specialization/enterprise/EnterpriseBeanSpecializationTest.java 2009-02-19 07:41:39 UTC (rev 1595)
@@ -35,8 +35,8 @@
@Test
@SpecAssertions({
- @SpecAssertion(section = "4.3.1", id = "unknown"),
- @SpecAssertion(section = "3.2.7", id = "unknown")
+ @SpecAssertion(section = "4.3.1", id = "c"),
+ @SpecAssertion(section = "3.2.7", id = "a")
})
public void testSpecializingBeanHasBindingsOfSpecializedAndSpecializingBean()
{
@@ -49,8 +49,8 @@
@Test
@SpecAssertions({
- @SpecAssertion(section = "4.3.1", id = "unknown"),
- @SpecAssertion(section = "3.2.7", id = "unknown")
+ @SpecAssertion(section = "4.3.1", id = "d"),
+ @SpecAssertion(section = "3.2.7", id = "a")
})
public void testSpecializingBeanHasNameOfSpecializedBean()
{
@@ -61,7 +61,7 @@
}
@Test(expectedExceptions=DefinitionException.class)
- @SpecAssertion(section = "4.3.1", id = "unknown")
+ @SpecAssertion(section = "4.3.1", id = "e")
public void testSpecializingAndSpecializedBeanHasName()
{
deployBeans(FarmYard_Broken.class);
@@ -69,8 +69,8 @@
@Test(groups="broken")
@SpecAssertions({
- @SpecAssertion(section = "4.3.1", id = "unknown"),
- @SpecAssertion(section = "3.2.7", id = "unknown")
+ @SpecAssertion(section = "4.3.1", id = "f"),
+ @SpecAssertion(section = "3.2.7", id = "b")
})
public void testSpecializedBeanNotInstantiated() throws Exception
{
@@ -89,14 +89,14 @@
}
@Test(expectedExceptions=InconsistentSpecializationException.class)
- @SpecAssertion(section="4.3.1", id = "unknown")
+ @SpecAssertion(section="4.3.3", id = "a")
public void testSpecializingBeanDoesNotHaveHigherPrecedenceThanSpecializedBean()
{
deployBeans(Farmer.class, OrganicFarmer_Broken.class);
}
@Test(groups="broken")
- @SpecAssertion(section="4.3.1", id = "unknown")
+ @SpecAssertion(section="4.3.1", id = "g")
public void testProducerMethodOnSpecializedBeanCalledOnSpecializingBean() throws Exception
{
deployBeans(Office.class, Building.class);
@@ -114,42 +114,42 @@
}
@Test(expectedExceptions=InconsistentSpecializationException.class)
- @SpecAssertion(section="4.3.1", id = "unknown")
+ @SpecAssertion(section="4.3.3", id = "a")
public void testTwoBeansSpecializeTheSameBean()
{
deployBeans(Farmer.class, SheepFarmer_Broken.class, FishFarmer_Broken.class);
}
@Test(groups={"specialization"},expectedExceptions=DefinitionException.class)
- @SpecAssertion(section="3.2.7", id = "unknown")
+ @SpecAssertion(section="3.2.7", id = "d")
public void testSpecializingClassDirectlyExtendsSimpleBean()
{
deployBeans(Tractor_Broken.class);
}
@Test(groups={"specialization"},expectedExceptions=DefinitionException.class)
- @SpecAssertion(section="3.2.7", id = "unknown")
+ @SpecAssertion(section="3.2.7", id = "d")
public void testSpecializingClassDirectlyExtendsNothing()
{
deployBeans(Cow_Broken.class);
}
@Test(groups={"specialization"},expectedExceptions=DefinitionException.class)
- @SpecAssertion(section="3.2.7", id = "unknown")
+ @SpecAssertion(section="3.2.7", id = "d")
public void testSpecializingClassImplementsInterfaceAndExtendsNothing()
{
deployBeans(Donkey_Broken.class);
}
@Test(groups={"broken", "specialization"},expectedExceptions=DefinitionException.class)
- @SpecAssertion(section="3.3.7", id = "unknown")
+ @SpecAssertion(section="3.3.7", id = "a")
public void testSpecializingBeanDoesNotSupportAllLocalInterfacesOnSpecializedBean()
{
assert false;
}
@Test(groups={"broken", "specialization"},expectedExceptions=DefinitionException.class)
- @SpecAssertion(section="3.3.7", id = "unknown")
+ @SpecAssertion(section="3.3.7", id = "a")
public void testSpecializingBeanDoesNotSupportLocalInterfaceView()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injection/InjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injection/InjectionTest.java 2009-02-19 01:54:31 UTC (rev 1594)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injection/InjectionTest.java 2009-02-19 07:41:39 UTC (rev 1595)
@@ -30,7 +30,7 @@
}
@Test(groups = { "injection", "producerMethod" })
- @SpecAssertion(section = "5.2", id = "unknown")
+ @SpecAssertion(section = "5.2", id = "review")
public void testInjectionPerformsBoxingIfNecessary() throws Exception
{
Bean<SpiderProducer> spiderProducer = createSimpleBean(SpiderProducer.class);
@@ -43,14 +43,14 @@
}
@Test(groups = { "injection", "producerMethod" }, expectedExceptions = NullableDependencyException.class)
- @SpecAssertion(section = "5.2", id = "unknown")
+ @SpecAssertion(section = "5.2", id = "a")
public void testPrimitiveInjectionPointResolvesToNullableWebBean() throws Exception
{
deployBeans(FarmHouseProducer_Broken.class, FarmHouse_Broken.class);
}
@Test(groups = { "injection", "clientProxy" }, expectedExceptions = ContextNotActiveException.class)
- @SpecAssertion(section = "5.3", id = "unknown")
+ @SpecAssertion(section = "5.3", id = "a")
public void testInvokeNormalInjectedWebBeanWhenContextNotActive()
{
Bean<TunaFarm> tunaFarmBean = createSimpleBean(TunaFarm.class);
@@ -63,7 +63,7 @@
}
@Test(groups = "injection")
- @SpecAssertion(section = "5.3", id = "unknown")
+ @SpecAssertion(section = "5.3", id = "b")
public void testInvokeDependentScopeWhenContextNotActive()
{
Bean<FoxRun> foxRunBean = createSimpleBean(FoxRun.class);
@@ -74,7 +74,7 @@
}
@Test(groups = "injection", expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.7", id = "unknown")
+ @SpecAssertion(section = "3.7", id = "outdated")
public void testInjectingStaticField()
{
Bean<BeanWithStaticBoundField_Broken> bean = createSimpleBean(BeanWithStaticBoundField_Broken.class);
@@ -84,7 +84,7 @@
}
@Test(groups = "injection", expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.7", id = "unknown")
+ @SpecAssertion(section = "3.7", id = "outdated")
public void testInjectingFinalField()
{
Bean<BeanWithFinalBoundField_Broken> bean = createSimpleBean(BeanWithFinalBoundField_Broken.class);
@@ -111,35 +111,35 @@
}
@Test(groups = { "stub", "injection", "webbeansxml" })
- @SpecAssertion(section = "3.8.2", id = "unknown")
+ @SpecAssertion(section = "3.8.2", id = "a")
public void testInjectFieldsDeclaredInXml()
{
assert false;
}
@Test(groups = { "stub", "injection", "webbeansxml" })
- @SpecAssertion(section = "3.8.2", id = "unknown")
+ @SpecAssertion(section = "3.8.2", id = "b")
public void testInjectedFieldDeclaredInXmlIgnoresJavaAnnotations()
{
assert false;
}
@Test(groups = { "stub", "injection", "webbeansxml" })
- @SpecAssertion(section = "3.8.2", id = "unknown")
+ @SpecAssertion(section = "3.8.2", id = "c")
public void testInjectedFieldDeclaredInXmlAssumesCurrent()
{
assert false;
}
@Test(groups = { "stub", "injection", "webbeansxml" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.8.2", id = "unknown")
+ @SpecAssertion(section = "3.8.2", id = "d")
public void testNonexistentFieldDefinedInXml()
{
assert false;
}
@Test(groups = { "stub", "injection", "webbeansxml" })
- @SpecAssertion(section = "3.8.2", id = "unknown")
+ @SpecAssertion(section = "3.8.2", id = "review")
public void testInjectFieldsDeclaredInXmlAndJava()
{
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:54:31 UTC (rev 1594)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 07:41:39 UTC (rev 1595)
@@ -1663,35 +1663,35 @@
</assertion>
<assertion id="l">
- <text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a QueueConnection, an UnsupportedOperationException is thrown by the container.</text>
+ <text>If the application calls close() on an instance of a QueueConnection, an UnsupportedOperationException is thrown by the container.</text>
</assertion>
<assertion id="m">
- <text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a QueueSession, an UnsupportedOperationException is thrown by the container.</text>
+ <text>If the application calls close() on an instance of a QueueSession, an UnsupportedOperationException is thrown by the container.</text>
</assertion>
<assertion id="n">
- <text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a QueueReceiver, an UnsupportedOperationException is thrown by the container.</text>
+ <text>If the application calls close() on an instance of a QueueReceiver, an UnsupportedOperationException is thrown by the container.</text>
</assertion>
<assertion id="o">
- <text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a QueueSender, an UnsupportedOperationException is thrown by the container.</text>
+ <text>If the application calls close() on an instance of a QueueSender, an UnsupportedOperationException is thrown by the container.</text>
</assertion>
<assertion id="p">
- <text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a TopicConnection, an UnsupportedOperationException is thrown by the container.</text>
+ <text>If the application calls close() on an instance of a TopicConnection, an UnsupportedOperationException is thrown by the container.</text>
</assertion>
<assertion id="q">
- <text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a TopicSession, an UnsupportedOperationException is thrown by the container.</text>
+ <text>If the application calls close() on an instance of a TopicSession, an UnsupportedOperationException is thrown by the container.</text>
</assertion>
<assertion id="r">
- <text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a TopicSubscriber, an UnsupportedOperationException is thrown by the container.</text>
+ <text>If the application calls close() on an instance of a TopicSubscriber, an UnsupportedOperationException is thrown by the container.</text>
</assertion>
<assertion id="s">
- <text>The lifecycles of the injected objects are managed by the container, and therefore the application need not explicitly close() any injected JMS object. If the application calls close() on an instance of a TopicPublisher, an UnsupportedOperationException is thrown by the container.</text>
+ <text>If the application calls close() on an instance of a TopicPublisher, an UnsupportedOperationException is thrown by the container.</text>
</assertion>
<assertion id="t">
@@ -2279,27 +2279,112 @@
</section>
<section id="5.4" title="Client proxies">
+ <assertion id="a">
+ <text>Client proxies are never required for a bean whose scope is a pseudo-scope such as @Dependent</text>
+ </assertion>
+ <assertion id="b">
+ <text>All client proxies must be serializable</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>All client proxies must be serializable</text>
+ </assertion>
</section>
<section id="5.4.1" title="Unproxyable bean types">
-
+ <assertion id="a">
+ <text>Classes without a non-private constructor with no parameters cannot be proxied by the container</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>Classes which are declared final or have final methods cannot be proxied by the container</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>Primitive types cannot be proxied by the container</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>Array types cannot be proxied by the container</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If an injection point whose declared type cannot be proxied by the container resolves to a bean with a normal scope, an UnproxyableDependencyException is thrown by the container at deployment time</text>
+ </assertion>
</section>
<section id="5.4.2" title="Client proxy invocation">
-
+ <assertion id="a">
+ <text>Every time a method of the bean is invoked upon a client proxy, the client proxy must obtain the context object by calling Manager.getContext(), passing the bean scope, then obtain an instance of the bean by calling Context.get(), passing the Bean instance representing the bean and an instance of CreationalContext, and invoke the method upon the bean</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The behavior of all methods declared by java.lang.Object, except for toString(), is undefined for a client proxy</text>
+ </assertion>
+
</section>
<section id="5.5" title="The default binding at injection points">
-
+ <assertion id="a">
+ <text>If an injection point declares no binding, the default binding @Current is assumed</text>
+ </assertion>
</section>
<section id="5.6" title="Injection point metadata">
-
+ <assertion id="a">
+ <text>The javax.inject.manager.InjectionPoint.getBean() method returns the Bean object representing the bean that defines the injection point</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The javax.inject.manager.InjectionPoint.getType() and getBindings() methods return the declared type and bindings of the injection point. If the injection point is declared in XML, the type and bindings are determined according to Section 9.10, "Specifying bean types and bindings"</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The javax.inject.manager.InjectionPoint.getMember() method returns the Field object in the case of field injection, the Method object in the case of method parameter injection or the Constructor object in the case of constructor parameter injection</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>The javax.inject.manager.InjectionPoint.getAnnotation() and getAnnotations() methods return annotations of the field in the case of field injection, or annotations of the parameter in the case of method parameter or constructor parameter injection. getAnnotation() returns a null value if no annotation of the given type exists at the injection point</text>
+ </assertion>
</section>
<section id="5.6.1" title="Injecting InjectionPoint">
-
+ <assertion id="a">
+ <text>Whenever a @Dependent scoped object is instantiated by the container for injection into a second bean, any injection point of type InjectionPoint and binding @Current receives an instance of InjectionPoint that represents the injection point of the second bean</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>When a @Dependent scoped object is instantiated by the container to receive a producer method, any injection point of type InjectionPoint and binding @Current receives a null value</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>When a @Dependent scoped object is instantiated by the container to receive a producer field, any injection point of type InjectionPoint and binding @Current receives a null value</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>When a @Dependent scoped object is instantiated by the container to receive an observer , any injection point of type InjectionPoint and binding @Current receives a null value</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>When a @Dependent scoped object is instantiated by the container to receive a disposal method invocation, any injection point of type InjectionPoint and binding @Current receives a null value</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>When a @Dependent scoped object is instantiated by the container during EL expression evaluation, any injection point of type InjectionPoint and binding @Current receives a null value</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>When a @Dependent scoped object is instantiated by the container as a result of a direct call to the Manager API, any injection point of type InjectionPoint and binding @Current receives a null value</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>If a bean that declares any scope other than @Dependent has an injection point of type InjectionPoint and binding @Current, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="i">
+ <text>If an object that is not a bean has an injection point of type InjectionPoint and binding @Current, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
</section>
<section id="5.7" title="The Manager object">
@@ -2307,11 +2392,100 @@
</section>
<section id="5.7.1" title="Resolving dependencies">
-
+ <assertion id="a">
+ <text>Implementations of Bean maintain a reference to an instance of Manager</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>When the Bean implementation performs dependency injection, it must obtain the contextual instances to inject by calling Manager.getInstanceToInject(), passing an instance of InjectionPoint that represents the injection point and the instance of CreationalContext that was passed to Bean.create()</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>Manager.getInstanceToInject() returns a contextual instance or client proxy to be injected to the given injection point</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>The Manager.getInstanceToInject() method must Identify the bean by calling Manager.resolveByType(), passing the type and bindings of the injection point</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>The Manager.getInstanceToInject() method must throw an UnsatisfiedDependencyException if resolveByType() did not return a bean</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>The Manager.getInstanceToInject() method must throw an AmbiguousDependencyException if resolveByType() returned more than one bean</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>The Manager.getInstanceToInject() method must throw an UnproxyableDependencyExceptionif the bean has a normal scope and the type cannot be proxied by the container, as defined in Section 5.4.1, "Unproxyable bean types"</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>The Manager.getInstanceToInject() method must obtain an instance of the bean (or a client proxy) by calling Manager.getInstance(), passing the Bean object representing the bean, and return it. Alternatively, return an incompletely initialized instance of the bean that was
+registered by calling CreationalContext.push(), as defined in Section 6.1, "The Contextual interface"</text>
+ </assertion>
</section>
<section id="5.7.2" title="Obtaining contextual instances">
-
+ <assertion id="a">
+ <text>The container provides a built-in bean with bean type Manager, scope @Dependent, deployment type @Standard and binding @Current. Thus, any bean may obtain an instance of Manager by injecting it</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The application may obtain the Manager object from JNDI. The container must register an instance of Manager with name java:app/Manager in JNDI at deployment time</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>A contextual instance of a bean may be obtained by calling Manager.getInstance(), passing the Bean object representing the bean</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>Manager.getInstance() returns a contextual instance or client proxy for the given bean</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If the given Bean instance represents a bean with a normal scope, as defined in Section 8.2, "Normal scopes and pseudo-scopes", Manager.getInstance() must return a client proxy</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>If the Bean instance represents a bean with a pseudo-scope, as defined in Section 8.2, "Normal scopes and pseudo-scopes", Manager.getInstance() must obtain the context object by calling Manager.getContext(), passing the bean scope, then obtain an instance of the bean by calling Context.get(), passing the Bean instance representing the bean and an instance of CreationalContext</text>
+ </assertion>
+
+ <assertion id="g">
+ <text>The Manager.getInstanceByType() methods obtain a contextual instance of a bean</text>
+ </assertion>
+
+ <assertion id="h">
+ <text>If no bindings are passed to Manager.getInstanceByType(), the default binding @Current is assumed</text>
+ </assertion>
+
+ <assertion id="i">
+ <text>If a parameterized type with a type parameter or wildcard is passed to resolveByType(), an IllegalArgumentException is thrown</text>
+ </assertion>
+
+ <assertion id="j">
+ <text>If two instances of the same binding type are passed to getInstanceByType(), a DuplicateBindingTypeException is thrown</text>
+ </assertion>
+
+ <assertion id="k">
+ <text>If an instance of an annotation that is not a binding type is passed to getInstanceByType(), an IllegalArgumentException is thrown</text>
+ </assertion>
+
+ <assertion id="l">
+ <text>The getInstanceByType() method must identify the bean by calling Manager.resolveByType(), passing the given type and bindings</text>
+ </assertion>
+
+ <assertion id="m">
+ <text>The getInstanceByType() method must throw an UnsatisfiedDependencyException if resolveByType() did not return a bean</text>
+ </assertion>
+
+ <assertion id="n">
+ <text>The getInstanceByType() method must throw an AmbiguousDependencyException if resolveByType() returned more than one bean</text>
+ </assertion>
+
+ <assertion id="o">
+ <text>The getInstanceByType() method must obtain an instance of the bean (or a client proxy) by calling Manager.getInstance(), passing the Bean object representing the bean, and return it</text>
+ </assertion>
</section>
<section id="5.8" title="Dynamic lookup">
@@ -3040,8 +3214,7 @@
</assertion>
<assertion id="h">
- <text>In either case of assertion f or g above, any non-transient field that holds a reference to another bean must be serialized along with the bean that is
-being serialized. Therefore, the reference must be to a serializable type</text>
+ <text>In either case of assertion f or g above, any non-transient field that holds a reference to another bean must be serialized along with the bean that is being serialized. Therefore, the reference must be to a serializable type</text>
</assertion>
<assertion id="i">
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1594 - 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:54:31 -0500 (Wed, 18 Feb 2009)
New Revision: 1594
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanLifecycleTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Some more assertions
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanLifecycleTest.java 2009-02-19 01:36:41 UTC (rev 1593)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/simple/SimpleBeanLifecycleTest.java 2009-02-19 01:54:31 UTC (rev 1594)
@@ -7,8 +7,9 @@
import javax.inject.CreationException;
import javax.inject.manager.Bean;
-import org.jboss.jsr299.tck.AbstractDeclarativeTest;
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.testng.annotations.Test;
@@ -32,7 +33,10 @@
}
@Test(groups = "beanConstruction")
- @SpecAssertion(section = "3.2.6.3", id = "unknown")
+ @SpecAssertions({
+ @SpecAssertion(section = "3.2.6.3", id = "a"),
+ @SpecAssertion(section = "2.3.6", id = "d")
+ })
public void testInjectionOfParametersIntoBeanConstructor()
{
Bean<FishPond> goldfishPondBean = createSimpleBean(FishPond.class);
@@ -44,7 +48,7 @@
}
@Test(groups = { "broken", "specialization" })
- @SpecAssertion(section = "3.2.7", id = "unknown")
+ @SpecAssertion(section = "3.2.7", id = "c")
public void testSpecializedBeanAlwaysUsed() throws Exception
{
deployBeans(Lion.class, MountainLion.class);
@@ -60,20 +64,6 @@
}.run();
}
- /**
- * The create() method performs the following tasks:
- *
- * • obtains an instance of the bean,
- *
- * • creates the interceptor and decorator stacks and binds them to the
- * instance,
- *
- * • injects any dependencies,
- *
- * • sets any initial field values defined in XML, and
- *
- * • calls the @PostConstruct method, if necessary.
- */
@Test(groups = "beanLifecycle")
@SpecAssertion(section = "6.2", id = "unknown")
public void testCreateReturnsInstanceOfBean()
@@ -197,7 +187,7 @@
* @throws Exception
*/
@Test
- @SpecAssertion(section = "4.2", id = "unknown")
+ @SpecAssertion(section = "4.2", id = "ba")
public void testSubClassInheritsPostConstructOnSuperclass() throws Exception
{
OrderProcessor.postConstructCalled = false;
@@ -222,7 +212,7 @@
* @throws Exception
*/
@Test
- @SpecAssertion(section = "4.2", id = "unknown")
+ @SpecAssertion(section = "4.2", id = "bb")
public void testSubClassInheritsPreDestroyOnSuperclass() throws Exception
{
OrderProcessor.preDestroyCalled = false;
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 01:36:41 UTC (rev 1593)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-19 01:54:31 UTC (rev 1594)
@@ -2070,10 +2070,14 @@
<text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares an injected field x then Y inherits x.</text>
</assertion>
- <assertion id="b">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares an initializer method, @PostConstruct method or @PreDestroy method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
+ <assertion id="ba">
+ <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares a @PostConstruct method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
</assertion>
+ <assertion id="bb">
+ <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares a @PreDestroy method x() then Y inherits x() if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()</text>
+ </assertion>
+
<assertion id="c">
<text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X declares a non-static method x() annotated with an interceptor binding type Z then Y inherits the binding if and only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x().</text>
</assertion>
17 years, 1 month