[webbeans-commits] Webbeans SVN: r3349 - in tck/trunk/impl/src/main: resources and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: jharting
Date: 2009-07-29 09:30:48 -0400 (Wed, 29 Jul 2009)
New Revision: 3349
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Sole.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Minor
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java 2009-07-29 12:31:43 UTC (rev 3348)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/ResolutionByTypeTest.java 2009-07-29 13:30:48 UTC (rev 3349)
@@ -119,6 +119,7 @@
}
assert classes.contains(Cod.class);
assert classes.contains(Sole.class);
+
}
@Test(groups = { "resolution" })
@@ -162,7 +163,7 @@
@Test(groups = "resolution")
@SpecAssertions( {
- @SpecAssertion(section = "5.3", id = "le"),
+ @SpecAssertion(section = "5.3", id = "ld"),
@SpecAssertion(section = "5.3.5", id = "b")
})
public void testResolveByTypeWithNonBindingMembers() throws Exception
@@ -183,20 +184,14 @@
}, new AnnotationLiteral<Whitefish>(){});
assert beans.size() == 2;
- List<Class<? extends Animal>> classes = new ArrayList<Class<? extends Animal>>();
+ Set<Type> classes = new HashSet<Type>();
for (Bean<Animal> bean : beans)
{
- if (bean.getTypes().contains(Halibut.class))
- {
- classes.add(Halibut.class);
- }
- else if (bean.getTypes().contains(RoundWhitefish.class))
- {
- classes.add(RoundWhitefish.class);
- }
+ classes.addAll(bean.getTypes());
}
assert classes.contains(Halibut.class);
assert classes.contains(RoundWhitefish.class);
+ assert !classes.contains(Sole.class);
}
@Test(groups = { "ri-broken", "policy" })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Sole.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Sole.java 2009-07-29 12:31:43 UTC (rev 3348)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/Sole.java 2009-07-29 13:30:48 UTC (rev 3349)
@@ -3,6 +3,7 @@
import javax.enterprise.inject.Named;
@Whitefish
+@Expensive(veryExpensive = false, cost = 100)
@Named("whitefish")
class Sole implements ScottishFish
{
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-29 12:31:43 UTC (rev 3348)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-29 13:30:48 UTC (rev 3349)
@@ -1869,13 +1869,9 @@
</assertion>
<assertion id="ld">
- <text>When resolving beans that are eligible for injection to an injection point, the container identifies the set of matching beans which are not interceptors or decorators and which have the required bindings. If no required bindings were explicitly specified, the container assumes the required binding |@Current|. The container narrows the set of matching beans to just those where for each required binding, the bean declares a matching binding with (a) the same type and (b) _the same annotation member value_ for each member which is not annotated |(a)javax.enterprise.inject.NonBinding| (see Section 5.3.5, "Binding annotations with members").</text>
+ <text>When resolving beans that are eligible for injection to an injection point, the container identifies the set of matching beans which are not interceptors or decorators and which have the required bindings. If no required bindings were explicitly specified, the container assumes the required binding |@Current|. The container narrows the set of matching beans to just those where for each required binding, the bean declares a matching binding with (a) the same type and (b) _the same annotation member value for each member which is not annotated |(a)javax.enterprise.inject.NonBinding| (see Section 5.3.5, "Binding annotations with members")._</text>
</assertion>
- <assertion id="le">
- <text>When resolving beans that are eligible for injection to an injection point, the container identifies the set of matching beans which are not interceptors or decorators and which have the required bindings. If no required bindings were explicitly specified, the container assumes the required binding |@Current|. The container narrows the set of matching beans to just those where for each required binding, the bean declares a matching binding with (a) the same type and (b) the same annotation member value for each member _which is not annotated |(a)javax.enterprise.inject.NonBinding|_ (see Section 5.3.5, "Binding annotations with members").</text>
- </assertion>
-
<assertion id="m">
<text>When resolving beans that are eligible for injection to an injection point, the container identifies the set of matching beans which are not interceptors or decorators. In a Java EE or servlet container, the bean class is required to be accessible to the class that declares the injection point, according to the class loading requirements of the Java EE platform and Java Servlet specifications.</text>
</assertion>
@@ -2299,9 +2295,13 @@
<text>The |get()| method must identify a bean that matches the required type and required bindings and is accessible to the class into which the parent |Instance| was injected, according to the rules of typesafe resolution, as defined in Section 5.3, "Typesafe resolution" and resolving ambiguities according to Section 5.3.1, "Unsatisfied and ambiguous dependencies".</text>
</assertion>
- <assertion id="fb">
- <text>If typesafe resolution results in an unsatisfied dependency, throw an |UnsatisfiedResolutionException|. If typesafe resolution results in an unresolvable ambiguous dependency, throw an |AmbiguousResolutionException|.</text>
+ <assertion id="fba">
+ <text>If typesafe resolution results in an unsatisfied dependency, throw an |UnsatisfiedResolutionException|.</text>
</assertion>
+
+ <assertion id="fbb">
+ <text>If typesafe resolution results in an unresolvable ambiguous dependency, throw an |AmbiguousResolutionException|.</text>
+ </assertion>
<assertion id="fc">
<text>Otherwise, obtain a contextual reference for the bean and the required type, as defined in Section 6.5.3, "Contextual reference for a bean".</text>
14 years, 9 months
[webbeans-commits] Webbeans SVN: r3348 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-07-29 08:31:43 -0400 (Wed, 29 Jul 2009)
New Revision: 3348
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/PassivationCapableBeanWIthNonPassivatingInitializerInDecorator.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/Static.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/StaticTarantulaConsumer.java
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/NonSerializableTest.java
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractContext.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/UnderwaterCity.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/ProducerFieldLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/StaticTarantulaProducer.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Fix remaining test failures
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractContext.java 2009-07-29 11:50:41 UTC (rev 3347)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractContext.java 2009-07-29 12:31:43 UTC (rev 3348)
@@ -86,12 +86,4 @@
this.active.set(Boolean.valueOf(active));
}
- /**
- * Delegates to a ThreadLocal instance
- */
- protected Boolean getActive()
- {
- return active.get();
- }
-
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java 2009-07-29 11:50:41 UTC (rev 3347)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java 2009-07-29 12:31:43 UTC (rev 3348)
@@ -91,15 +91,5 @@
{
return true;
}
-
- @Deprecated
- public <T> void destroyAndRemove(Contextual<T> contextual, T instance)
- {
- if (contextual instanceof Contextual)
- {
- CreationalContextImpl<T> creationalContext = new CreationalContextImpl<T>(contextual);
- contextual.destroy(instance, creationalContext.getCreationalContext(contextual));
- }
- }
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java 2009-07-29 11:50:41 UTC (rev 3347)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java 2009-07-29 12:31:43 UTC (rev 3348)
@@ -51,7 +51,7 @@
@SpecAssertion(section = "6.6.1", id = "bc")
public void testManagedBeanWithSerializableDecoratorOK()
{
- Set<Bean<CityDecorator>> beans = getBeans(CityDecorator.class);
+ Set<Bean<City>> beans = getBeans(City.class);
assert !beans.isEmpty();
}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/NonSerializableTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/NonSerializableTest.java 2009-07-29 11:50:41 UTC (rev 3347)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/NonSerializableTest.java 2009-07-29 12:31:43 UTC (rev 3348)
@@ -1,22 +0,0 @@
-package org.jboss.jsr299.tck.tests.context.passivating.broken18;
-
-import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.jsr299.tck.DeploymentError;
-import org.jboss.test.audit.annotations.SpecAssertion;
-import org.jboss.test.audit.annotations.SpecVersion;
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
-import org.testng.annotations.Test;
-
-@Artifact
-(a)ExpectedDeploymentException(DeploymentError.class)
-@SpecVersion("20090625")
-public class NonSerializableTest extends AbstractJSR299Test
-{
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "6.6.4", id = "aah")
- public void testPassivationCapableBeanWithNonPassivatingInitializerInDecoratorFails()
- {
- assert false;
- }
-}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/PassivationCapableBeanWIthNonPassivatingInitializerInDecorator.java (from rev 3346, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/NonSerializableTest.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/PassivationCapableBeanWIthNonPassivatingInitializerInDecorator.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/PassivationCapableBeanWIthNonPassivatingInitializerInDecorator.java 2009-07-29 12:31:43 UTC (rev 3348)
@@ -0,0 +1,23 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken18;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)ExpectedDeploymentException(DeploymentError.class)
+@SpecVersion("20090625")
+public class PassivationCapableBeanWIthNonPassivatingInitializerInDecorator extends AbstractJSR299Test
+{
+ @Test(groups = { "contexts", "passivation", "ri-broken" })
+ @SpecAssertion(section = "6.6.4", id = "aah")
+ // WBRI-326
+ public void testPassivationCapableBeanWithNonPassivatingInitializerInDecoratorFails()
+ {
+ assert false;
+ }
+}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/UnderwaterCity.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/UnderwaterCity.java 2009-07-29 11:50:41 UTC (rev 3347)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/UnderwaterCity.java 2009-07-29 12:31:43 UTC (rev 3348)
@@ -1,5 +1,8 @@
package org.jboss.jsr299.tck.tests.context.passivating.broken18;
+import javax.enterprise.context.RequestScoped;
+
+@RequestScoped
class UnderwaterCity implements CityInterface
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/ProducerFieldLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/ProducerFieldLifecycleTest.java 2009-07-29 11:50:41 UTC (rev 3347)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/ProducerFieldLifecycleTest.java 2009-07-29 12:31:43 UTC (rev 3348)
@@ -2,10 +2,10 @@
import javax.enterprise.inject.IllegalProductException;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.test.audit.annotations.SpecAssertion;
import org.jboss.test.audit.annotations.SpecAssertions;
import org.jboss.test.audit.annotations.SpecVersion;
-import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.testng.annotations.Test;
@@ -32,7 +32,7 @@
})
public void testProducerStaticFieldBean()
{
- TarantulaConsumer tarantulaConsumer = getInstanceByType(TarantulaConsumer.class);
+ StaticTarantulaConsumer tarantulaConsumer = getInstanceByType(StaticTarantulaConsumer.class);
assert tarantulaConsumer.getConsumedTarantula().equals(StaticTarantulaProducer.produceTarantula);
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/Static.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/Static.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/Static.java 2009-07-29 12:31:43 UTC (rev 3348)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.inject.BindingType;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@interface Static
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/Static.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/StaticTarantulaConsumer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/StaticTarantulaConsumer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/StaticTarantulaConsumer.java 2009-07-29 12:31:43 UTC (rev 3348)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle;
+
+
+/**
+ * This bean contains an injection point for a Tarantula that must be provided
+ * by the container via a (static) producer field.
+ *
+ * @author David Allen
+ *
+ */
+public class StaticTarantulaConsumer
+{
+ @Static
+ private Tarantula consumedTarantula;
+
+ public Tarantula getConsumedTarantula()
+ {
+ return consumedTarantula;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/StaticTarantulaConsumer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/StaticTarantulaProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/StaticTarantulaProducer.java 2009-07-29 11:50:41 UTC (rev 3347)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/StaticTarantulaProducer.java 2009-07-29 12:31:43 UTC (rev 3348)
@@ -21,6 +21,6 @@
public class StaticTarantulaProducer
{
- @Produces @SpiderStereotype public static Tarantula produceTarantula = new Tarantula();
+ @Produces @Static public static Tarantula produceTarantula = new Tarantula();
}
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-29 11:50:41 UTC (rev 3347)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-29 12:31:43 UTC (rev 3348)
@@ -3379,8 +3379,9 @@
</section>
<section id="8.1" title="Decorator beans">
- <assertion id="a">
+ <assertion id="a" testable="false">
<text>A decorator is a managed bean.</text>
+ <note>Statement of intent</note>
</assertion>
<assertion id="b">
14 years, 9 months
[webbeans-commits] Webbeans SVN: r3347 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-07-29 07:50:41 -0400 (Wed, 29 Jul 2009)
New Revision: 3347
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/DecoratorDefinitionTest.java
Log:
Fix my poor understanding of what "a decorator is a managed bean" means ;-)
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/DecoratorDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/DecoratorDefinitionTest.java 2009-07-29 08:18:24 UTC (rev 3346)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/decorators/definition/DecoratorDefinitionTest.java 2009-07-29 11:50:41 UTC (rev 3347)
@@ -18,17 +18,15 @@
import java.io.Serializable;
import java.util.List;
-import java.util.Set;
import javax.decorator.Decorates;
import javax.enterprise.inject.Current;
-import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.Decorator;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.test.audit.annotations.SpecAssertion;
import org.jboss.test.audit.annotations.SpecAssertions;
import org.jboss.test.audit.annotations.SpecVersion;
-import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.testng.annotations.Test;
@@ -44,7 +42,6 @@
@Test
@SpecAssertions
({
- @SpecAssertion(section="8.1", id="a"),
@SpecAssertion(section="8.1", id="d"),
@SpecAssertion(section="8.1.1", id="a"),
@SpecAssertion(section="8.1.3", id="c"),
@@ -56,9 +53,6 @@
{
List<Decorator<?>> decorators = getCurrentManager().resolveDecorators(MockLogger.TYPES);
assert decorators.size() == 1;
- Set<Bean<?>> beans = getCurrentManager().getBeans(TimestampLogger.class);
- assert beans.size() == 1;
- assert decorators.get(0).equals(beans.iterator().next());
boolean implementsInterface = false;
for (Class<?> interfaze : decorators.get(0).getClass().getInterfaces())
{
14 years, 9 months
[webbeans-commits] Webbeans SVN: r3346 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating: broken12 and 6 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-07-29 04:18:24 -0400 (Wed, 29 Jul 2009)
New Revision: 3346
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/CityDecorator.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/CityInterface.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/NonPassivating.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/NonSerializableTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/UnderwaterCity.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/CityDecorator.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/CityInterface.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/NonPassivating.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/NonSerializableTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/UnderwaterCity.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/CityDecorator.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/CityInterface.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/NonPassivating.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/NonSerializableTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/UnderwaterCity.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/NonSerializableTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/NonSerializableTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/NonSerializableTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken15/NonSerializableTest.java
Log:
passivation tests
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/NonSerializableTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/NonSerializableTest.java 2009-07-29 07:26:41 UTC (rev 3345)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken12/NonSerializableTest.java 2009-07-29 08:18:24 UTC (rev 3346)
@@ -1,5 +1,6 @@
package org.jboss.jsr299.tck.tests.context.passivating.broken12;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.jsr299.tck.DeploymentError;
import org.jboss.test.audit.annotations.SpecAssertion;
import org.jboss.test.audit.annotations.SpecVersion;
@@ -10,7 +11,7 @@
@Artifact
@ExpectedDeploymentException(DeploymentError.class)
@SpecVersion("20090625")
-public class NonSerializableTest
+public class NonSerializableTest extends AbstractJSR299Test
{
@Test(groups = { "contexts", "passivation", "ri-broken" })
@SpecAssertion(section = "6.6.4", id = "aac")
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/NonSerializableTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/NonSerializableTest.java 2009-07-29 07:26:41 UTC (rev 3345)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken13/NonSerializableTest.java 2009-07-29 08:18:24 UTC (rev 3346)
@@ -1,5 +1,6 @@
package org.jboss.jsr299.tck.tests.context.passivating.broken13;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.jsr299.tck.DeploymentError;
import org.jboss.test.audit.annotations.SpecAssertion;
import org.jboss.test.audit.annotations.SpecVersion;
@@ -10,7 +11,7 @@
@Artifact
@ExpectedDeploymentException(DeploymentError.class)
@SpecVersion("20090625")
-public class NonSerializableTest
+public class NonSerializableTest extends AbstractJSR299Test
{
@Test(groups = { "contexts", "passivation", "ri-broken" })
@SpecAssertion(section = "6.6.4", id = "aad")
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/NonSerializableTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/NonSerializableTest.java 2009-07-29 07:26:41 UTC (rev 3345)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken14/NonSerializableTest.java 2009-07-29 08:18:24 UTC (rev 3346)
@@ -1,5 +1,6 @@
package org.jboss.jsr299.tck.tests.context.passivating.broken14;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.jsr299.tck.DeploymentError;
import org.jboss.test.audit.annotations.SpecAssertion;
import org.jboss.test.audit.annotations.SpecVersion;
@@ -10,7 +11,7 @@
@Artifact
@ExpectedDeploymentException(DeploymentError.class)
@SpecVersion("20090625")
-public class NonSerializableTest
+public class NonSerializableTest extends AbstractJSR299Test
{
@Test(groups = { "contexts", "passivation", "ri-broken" })
@SpecAssertion(section = "6.6.4", id = "aae")
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken15/NonSerializableTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken15/NonSerializableTest.java 2009-07-29 07:26:41 UTC (rev 3345)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken15/NonSerializableTest.java 2009-07-29 08:18:24 UTC (rev 3346)
@@ -1,9 +1,17 @@
package org.jboss.jsr299.tck.tests.context.passivating.broken15;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentError;
import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
import org.testng.annotations.Test;
-public class NonSerializableTest
+@Artifact
+(a)ExpectedDeploymentException(DeploymentError.class)
+@SpecVersion("20090625")
+public class NonSerializableTest extends AbstractJSR299Test
{
@Test(groups = { "contexts", "passivation", "ri-broken"})
@SpecAssertion(section = "6.6.1", id = "bb")
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/CityDecorator.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/CityDecorator.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/CityDecorator.java 2009-07-29 08:18:24 UTC (rev 3346)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken16;
+
+import java.io.Serializable;
+
+import javax.decorator.Decorates;
+import javax.decorator.Decorator;
+import javax.enterprise.inject.Any;
+import javax.enterprise.inject.Current;
+
+@SuppressWarnings("serial")
+@Decorator
+class CityDecorator implements CityInterface, Serializable
+{
+ @Decorates @Any CityInterface city;
+
+ @Current NonPassivating nonPassivating;
+
+ public void foo()
+ {
+ city.foo();
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/CityInterface.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/CityInterface.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/CityInterface.java 2009-07-29 08:18:24 UTC (rev 3346)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken16;
+
+interface CityInterface
+{
+ public void foo();
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/NonPassivating.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/NonPassivating.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/NonPassivating.java 2009-07-29 08:18:24 UTC (rev 3346)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken16;
+
+class NonPassivating
+{
+ private NonPassivating(String foo) {}
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/NonSerializableTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/NonSerializableTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/NonSerializableTest.java 2009-07-29 08:18:24 UTC (rev 3346)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken16;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)ExpectedDeploymentException(DeploymentError.class)
+@SpecVersion("20090625")
+public class NonSerializableTest extends AbstractJSR299Test
+{
+ @Test(groups = { "contexts", "passivation", "ri-broken" })
+ @SpecAssertion(section = "6.6.4", id = "aaf")
+ public void testPassivationCapableBeanWithNonPassivatingDecoratorInjectedFieldFails()
+ {
+ assert false;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/UnderwaterCity.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/UnderwaterCity.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken16/UnderwaterCity.java 2009-07-29 08:18:24 UTC (rev 3346)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken16;
+
+class UnderwaterCity implements CityInterface
+{
+
+ public void foo()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/CityDecorator.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/CityDecorator.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/CityDecorator.java 2009-07-29 08:18:24 UTC (rev 3346)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken17;
+
+import java.io.Serializable;
+
+import javax.decorator.Decorates;
+import javax.decorator.Decorator;
+import javax.enterprise.inject.Any;
+import javax.enterprise.inject.Current;
+
+@SuppressWarnings("serial")
+@Decorator
+class CityDecorator implements CityInterface, Serializable
+{
+ @Decorates @Any CityInterface city;
+
+ public CityDecorator(@Current NonPassivating nonPassivating) {}
+
+ public void foo()
+ {
+ city.foo();
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/CityInterface.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/CityInterface.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/CityInterface.java 2009-07-29 08:18:24 UTC (rev 3346)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken17;
+
+interface CityInterface
+{
+ public void foo();
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/NonPassivating.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/NonPassivating.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/NonPassivating.java 2009-07-29 08:18:24 UTC (rev 3346)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken17;
+
+class NonPassivating
+{
+ private NonPassivating(String foo) {}
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/NonSerializableTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/NonSerializableTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/NonSerializableTest.java 2009-07-29 08:18:24 UTC (rev 3346)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken17;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)ExpectedDeploymentException(DeploymentError.class)
+@SpecVersion("20090625")
+public class NonSerializableTest extends AbstractJSR299Test
+{
+ @Test(groups = { "contexts", "passivation", "ri-broken" })
+ @SpecAssertion(section = "6.6.4", id = "aag")
+ public void testPassivationCapableBeanWithNonPassivatingDecoratorBeanConstructorFails()
+ {
+ assert false;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/UnderwaterCity.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/UnderwaterCity.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken17/UnderwaterCity.java 2009-07-29 08:18:24 UTC (rev 3346)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken17;
+
+class UnderwaterCity implements CityInterface
+{
+
+ public void foo()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/CityDecorator.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/CityDecorator.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/CityDecorator.java 2009-07-29 08:18:24 UTC (rev 3346)
@@ -0,0 +1,24 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken18;
+
+import java.io.Serializable;
+
+import javax.decorator.Decorates;
+import javax.decorator.Decorator;
+import javax.enterprise.inject.Any;
+import javax.enterprise.inject.Current;
+import javax.enterprise.inject.Initializer;
+
+@SuppressWarnings("serial")
+@Decorator
+class CityDecorator implements CityInterface, Serializable
+{
+ @Decorates @Any CityInterface city;
+
+ @Initializer
+ public void init(@Current NonPassivating nonPassivating) {}
+
+ public void foo()
+ {
+ city.foo();
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/CityInterface.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/CityInterface.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/CityInterface.java 2009-07-29 08:18:24 UTC (rev 3346)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken18;
+
+interface CityInterface
+{
+ public void foo();
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/NonPassivating.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/NonPassivating.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/NonPassivating.java 2009-07-29 08:18:24 UTC (rev 3346)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken18;
+
+class NonPassivating
+{
+ private NonPassivating(String foo) {}
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/NonSerializableTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/NonSerializableTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/NonSerializableTest.java 2009-07-29 08:18:24 UTC (rev 3346)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken18;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)ExpectedDeploymentException(DeploymentError.class)
+@SpecVersion("20090625")
+public class NonSerializableTest extends AbstractJSR299Test
+{
+ @Test(groups = { "contexts", "passivation" })
+ @SpecAssertion(section = "6.6.4", id = "aah")
+ public void testPassivationCapableBeanWithNonPassivatingInitializerInDecoratorFails()
+ {
+ assert false;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/UnderwaterCity.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/UnderwaterCity.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/UnderwaterCity.java 2009-07-29 08:18:24 UTC (rev 3346)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken18;
+
+class UnderwaterCity implements CityInterface
+{
+
+ public void foo()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+}
14 years, 9 months
[webbeans-commits] Webbeans SVN: r3345 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/unproxyable and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-07-29 03:26:41 -0400 (Wed, 29 Jul 2009)
New Revision: 3345
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/unproxyable/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/unproxyable/UnproxyableBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/unproxyable/UnproxyableManagedBeanTest.java
Modified:
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
More assertion groupings, unproxyable managed bean test
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/unproxyable/UnproxyableBean.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/unproxyable/UnproxyableBean.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/unproxyable/UnproxyableBean.java 2009-07-29 07:26:41 UTC (rev 3345)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.lifecycle.unproxyable;
+
+import javax.enterprise.context.RequestScoped;
+
+@RequestScoped
+public class UnproxyableBean
+{
+ private UnproxyableBean() {}
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/unproxyable/UnproxyableManagedBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/unproxyable/UnproxyableManagedBeanTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/lifecycle/unproxyable/UnproxyableManagedBeanTest.java 2009-07-29 07:26:41 UTC (rev 3345)
@@ -0,0 +1,23 @@
+package org.jboss.jsr299.tck.tests.implementation.simple.lifecycle.unproxyable;
+
+import javax.enterprise.inject.UnproxyableResolutionException;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)ExpectedDeploymentException(UnproxyableResolutionException.class)
+@SpecVersion("20090625")
+public class UnproxyableManagedBeanTest extends AbstractJSR299Test
+{
+ @Test(groups = { "contexts" })
+ @SpecAssertion(section = "6.5.3", id = "a")
+ public void testNormalScopedUnproxyableBeanThrowsException()
+ {
+ assert false;
+ }
+}
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-29 06:21:40 UTC (rev 3344)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-29 07:26:41 UTC (rev 3345)
@@ -2692,19 +2692,23 @@
<text>As defined by the EJB specification, all stateful session beans are passivation capable. Stateless and singleton session beans are not passivation capable.</text>
<note>Defined by EJB spec</note>
</assertion>
+
+ <group>
+ <text>A managed bean is passivation capable if and only if the bean class is serializable and all interceptors and decorators of the bean are serializable.</text>
+
+ <assertion id="ba">
+ <text>Tests with a serializable bean class.</text>
+ </assertion>
+
+ <assertion id="bb">
+ <text>Tests with a serializable interceptor.</text>
+ </assertion>
+
+ <assertion id="bc">
+ <text>Tests with a serializable decorator.</text>
+ </assertion>
+ </group>
- <assertion id="ba">
- <text>A managed bean is passivation capable if and only if the bean class is _serializable_ and all interceptors and decorators of the bean are serializable.</text>
- </assertion>
-
- <assertion id="bb">
- <text>A managed bean is passivation capable if and only if the bean class is serializable and all _interceptors_ and decorators of the bean are serializable.</text>
- </assertion>
-
- <assertion id="bc">
- <text>A managed bean is passivation capable if and only if the bean class is serializable and all interceptors and _decorators_ of the bean are serializable.</text>
- </assertion>
-
<assertion id="ca">
<text>A producer method is passivation capable if and only if it never returns a value which is not passivation capable at runtime. _A producer method with a return type that implements or extends serializable is passivation capable_. A producer method with a return type that is declared final and does not implement |Serializable| is not passivation capable.</text>
</assertion>
@@ -2781,42 +2785,49 @@
<text>If a managed bean which declares a passivating scope is not passivation capable, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
<note>Here we check the class, as interceptors and decorators are tested below</note>
</assertion>
+
+ <group>
+ <text>If a managed bean which declares a passivating scope has a non-transient injected field, bean constructor parameter or initializer method parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
+ <assertion id="aaba">
+ <text>Test with injected field.</text>
+ </assertion>
+
+ <assertion id="aabb">
+ <text>Test with bean constructor parameter.</text>
+ </assertion>
+
+ <assertion id="aabc">
+ <text>Test with initializer method parameter.</text>
+ </assertion>
+ </group>
+
+ <group>
+ <text>If a managed bean which declares a passivating scope has an interceptor or decorator with a non-transient injected field, bean constructor parameter or initializer method parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- <assertion id="aaba">
- <text>If a managed bean which declares a passivating scope has a non-transient injected field~, bean constructor parameter or initializer method parameter~ that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
-
- <assertion id="aabb">
- <text>If a managed bean which declares a passivating scope has a non-transient ~injected field,~ bean constructor parameter ~or initializer method parameter~ that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
-
- <assertion id="aabc">
- <text>If a managed bean which declares a passivating scope has a non-transient ~injected field, bean constructor parameter or~ initializer method parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
-
- <assertion id="aac">
- <text>If a managed bean which declares a passivating scope has an interceptor ~or decorator~ with a non-transient injected field~, bean constructor parameter or initializer method parameter~ that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
-
- <assertion id="aad">
- <text>If a managed bean which declares a passivating scope has an interceptor ~or decorator~ with a non-transient ~injected field,~ bean constructor parameter ~or initializer method parameter~ that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
-
- <assertion id="aae">
- <text>If a managed bean which declares a passivating scope has an interceptor ~or decorator~ with a non-transient ~injected field, bean constructor parameter or~ initializer method parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
-
- <assertion id="aaf">
- <text>If a managed bean which declares a passivating scope has an ~interceptor or~ decorator with a non-transient injected field~, bean constructor parameter or initializer method parameter~ that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
-
- <assertion id="aag">
- <text>If a managed bean which declares a passivating scope has an ~interceptor or~ decorator with a non-transient ~injected field,~ bean constructor parameter ~or initializer method parameter~ that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
-
- <assertion id="aah">
- <text>If a managed bean which declares a passivating scope has an ~interceptor or~ decorator with a non-transient ~injected field, bean constructor parameter or~ initializer method parameter that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
- </assertion>
+ <assertion id="aac">
+ <text>Test interceptor with injected field.</text>
+ </assertion>
+
+ <assertion id="aad">
+ <text>Test interceptor with bean constructor parameter.</text>
+ </assertion>
+
+ <assertion id="aae">
+ <text>Test interceptor with initializer method parameter.</text>
+ </assertion>
+
+ <assertion id="aaf">
+ <text>Test decorator with injected field.</text>
+ </assertion>
+
+ <assertion id="aag">
+ <text>Test decorator with bean constructor parameter.</text>
+ </assertion>
+
+ <assertion id="aah">
+ <text>Test decorator with initializer method parameter.</text>
+ </assertion>
+ </group>
<assertion id="ba">
<text>If a stateful session bean has a non-transient injected field~, bean constructor parameter or initializer method parameter~ that does not resolve to a passivation capable dependency, then the container automatically detects the problem and treats it as a deployment problem, as defined in Section 12.4, "Problems detected automatically by the container".</text>
14 years, 9 months
[webbeans-commits] Webbeans SVN: r3344 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck: tests/context/dependent and 14 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-07-29 02:21:40 -0400 (Wed, 29 Jul 2009)
New Revision: 3344
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractJSR299Test.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/fires/nonbinding/NonBindingTypePassedToFireTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/EnterpriseEventInheritenceTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanICTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/remove/EnterpriseBeanRemoveMethodTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/ProducerFieldLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/SimpleBeanDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/EnterpriseBeanSpecializationIntegrationTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/byname/ResolutionByNameTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/PolicyAvailabilityTest.java
Log:
removed RunInDependentContext
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractJSR299Test.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractJSR299Test.java 2009-07-29 05:07:40 UTC (rev 3343)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractJSR299Test.java 2009-07-29 06:21:40 UTC (rev 3344)
@@ -26,43 +26,6 @@
public abstract class AbstractJSR299Test extends org.jboss.testharness.AbstractTest
{
-
- protected abstract static class RunInDependentContext
- {
-
- protected void setup()
- {
- getCurrentConfiguration().getContexts().setActive(getCurrentConfiguration().getContexts().getDependentContext());
- }
-
- protected void cleanup()
- {
- getCurrentConfiguration().getContexts().setInactive(getCurrentConfiguration().getContexts().getDependentContext());
- }
-
- public final void run() throws Exception
- {
- try
- {
- setup();
- execute();
- }
- finally
- {
- cleanup();
- }
- }
-
- protected JSR299Configuration getCurrentConfiguration()
- {
- return JSR299ConfigurationImpl.get();
- }
-
- protected abstract void execute() throws Exception;
-
- }
-
-
protected BeanManager getCurrentManager()
{
return getCurrentConfiguration().getManagers().getManager();
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java 2009-07-29 05:07:40 UTC (rev 3343)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java 2009-07-29 06:21:40 UTC (rev 3344)
@@ -45,19 +45,12 @@
@SpecAssertion(section = "6.4", id = "c")
public void testInstanceUsedForElEvaluationNotShared() throws Exception
{
- new RunInDependentContext()
- {
- @Override
- protected void execute() throws Exception
- {
- Set<Bean<Fox>> foxBeans = getBeans(Fox.class);
- assert foxBeans.size() == 1;
+ Set<Bean<Fox>> foxBeans = getBeans(Fox.class);
+ assert foxBeans.size() == 1;
- Fox fox1 = getCurrentConfiguration().getEl().evaluateValueExpression("#{fox}", Fox.class);
- Fox fox2 = getCurrentConfiguration().getEl().evaluateValueExpression("#{fox}", Fox.class);
- assert !fox1.equals(fox2);
- }
- }.run();
+ Fox fox1 = getCurrentConfiguration().getEl().evaluateValueExpression("#{fox}", Fox.class);
+ Fox fox2 = getCurrentConfiguration().getEl().evaluateValueExpression("#{fox}", Fox.class);
+ assert !fox1.equals(fox2);
}
@Test(groups = { "contexts", "producerMethod" })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/fires/nonbinding/NonBindingTypePassedToFireTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/fires/nonbinding/NonBindingTypePassedToFireTest.java 2009-07-29 05:07:40 UTC (rev 3343)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/fires/nonbinding/NonBindingTypePassedToFireTest.java 2009-07-29 06:21:40 UTC (rev 3344)
@@ -14,15 +14,7 @@
@SpecAssertion(section = "11.3.10", id = "e")
public void testExceptionThrownIfNonBindingTypePassedToFire() throws Exception
{
- new RunInDependentContext()
- {
- @Override
- protected void execute() throws Exception
- {
- OwlFinch_Broken bean = getInstanceByType(OwlFinch_Broken.class);
- bean.methodThatFiresEvent();
- }
-
- }.run();
+ OwlFinch_Broken bean = getInstanceByType(OwlFinch_Broken.class);
+ bean.methodThatFiresEvent();
}
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/EnterpriseEventInheritenceTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/EnterpriseEventInheritenceTest.java 2009-07-29 05:07:40 UTC (rev 3343)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/EnterpriseEventInheritenceTest.java 2009-07-29 06:21:40 UTC (rev 3344)
@@ -28,45 +28,29 @@
@SpecAssertion(section = "4.2", id = "df")
public void testNonStaticObserverMethodNotInherited() throws Exception
{
- new RunInDependentContext()
- {
- @Override
- protected void execute() throws Exception
- {
- Egg egg = new Egg();
- Set<ObserverMethod<?, Egg>> observers = getCurrentManager().resolveObserverMethods(egg);
- assert observers.size() == 1;
+ Egg egg = new Egg();
+ Set<ObserverMethod<?, Egg>> observers = getCurrentManager().resolveObserverMethods(egg);
+ assert observers.size() == 1;
- // Notify the observer so we can confirm that it
- // is a method only on Farmer, and not LazyFarmer
- observers.iterator().next().notify(egg);
- assert egg.getClassesVisited().size() == 1;
- assert egg.getClassesVisited().iterator().next().equals(Farmer.class);
- }
-
- }.run();
+ // Notify the observer so we can confirm that it
+ // is a method only on Farmer, and not LazyFarmer
+ observers.iterator().next().notify(egg);
+ assert egg.getClassesVisited().size() == 1;
+ assert egg.getClassesVisited().iterator().next().equals(Farmer.class);
}
@Test(groups = { "events", "inheritance" })
@SpecAssertion(section = "4.2", id = "dl")
public void testNonStaticObserverMethodNotIndirectlyInherited() throws Exception
{
- new RunInDependentContext()
- {
- @Override
- protected void execute() throws Exception
- {
- StockPrice stockPrice = new StockPrice();
- Set<ObserverMethod<?, StockPrice>> observers = getCurrentManager().resolveObserverMethods(stockPrice);
- assert observers.size() == 1;
+ StockPrice stockPrice = new StockPrice();
+ Set<ObserverMethod<?, StockPrice>> observers = getCurrentManager().resolveObserverMethods(stockPrice);
+ assert observers.size() == 1;
- // Notify the observer so we can confirm that it
- // is a method only on StockWatcher, and not IndirectStockWatcher
- observers.iterator().next().notify(stockPrice);
- assert stockPrice.getClassesVisited().size() == 1;
- assert stockPrice.getClassesVisited().iterator().next().equals(StockWatcher.class);
- }
-
- }.run();
+ // Notify the observer so we can confirm that it
+ // is a method only on StockWatcher, and not IndirectStockWatcher
+ observers.iterator().next().notify(stockPrice);
+ assert stockPrice.getClassesVisited().size() == 1;
+ assert stockPrice.getClassesVisited().iterator().next().equals(StockWatcher.class);
}
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java 2009-07-29 05:07:40 UTC (rev 3343)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/disposal/method/definition/DisposalMethodDefinitionTest.java 2009-07-29 06:21:40 UTC (rev 3344)
@@ -35,19 +35,10 @@
})
public void testBindingTypesAppliedToDisposalMethodParameters() throws Exception
{
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- Bean<Tarantula> tarantula = getBeans(Tarantula.class, DEADLIEST_LITERAL).iterator().next();
- CreationalContext<Tarantula> creationalContext = getCurrentManager().createCreationalContext(tarantula);
- Tarantula instance = tarantula.create(creationalContext);
- tarantula.destroy(instance, creationalContext);
- }
-
- }.run();
+ Bean<Tarantula> tarantula = getBeans(Tarantula.class, DEADLIEST_LITERAL).iterator().next();
+ CreationalContext<Tarantula> creationalContext = getCurrentManager().createCreationalContext(tarantula);
+ Tarantula instance = tarantula.create(creationalContext);
+ tarantula.destroy(instance, creationalContext);
assert SpiderProducer.isTameSpiderDestroyed();
}
@@ -58,19 +49,10 @@
})
public void testDisposalMethodOnNonBean() throws Exception
{
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- Bean<Tarantula> tarantula = getBeans(Tarantula.class, DEADLIEST_LITERAL).iterator().next();
- CreationalContext<Tarantula> creationalContext = getCurrentManager().createCreationalContext(tarantula);
- Tarantula instance = getCurrentManager().getContext(tarantula.getScopeType()).get(tarantula);
- tarantula.destroy(instance, creationalContext);
- }
-
- }.run();
+ Bean<Tarantula> tarantula = getBeans(Tarantula.class, DEADLIEST_LITERAL).iterator().next();
+ CreationalContext<Tarantula> creationalContext = getCurrentManager().createCreationalContext(tarantula);
+ Tarantula instance = getCurrentManager().getContext(tarantula.getScopeType()).get(tarantula);
+ tarantula.destroy(instance, creationalContext);
assert !DisposalNonBean.isSpiderDestroyed();
}
@@ -89,19 +71,10 @@
})
public void testDisposalMethodParametersGetInjected() throws Exception
{
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- Bean<Tarantula> tarantula = getBeans(Tarantula.class, DEADLIEST_LITERAL).iterator().next();
- CreationalContext<Tarantula> creationalContext = getCurrentManager().createCreationalContext(tarantula);
- Tarantula instance = getCurrentManager().getContext(tarantula.getScopeType()).get(tarantula);
- tarantula.destroy(instance, creationalContext);
- }
-
- }.run();
+ Bean<Tarantula> tarantula = getBeans(Tarantula.class, DEADLIEST_LITERAL).iterator().next();
+ CreationalContext<Tarantula> creationalContext = getCurrentManager().createCreationalContext(tarantula);
+ Tarantula instance = getCurrentManager().getContext(tarantula.getScopeType()).get(tarantula);
+ tarantula.destroy(instance, creationalContext);
assert SpiderProducer.isDeadliestSpiderDestroyed();
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanICTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanICTest.java 2009-07-29 05:07:40 UTC (rev 3343)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/newBean/NewEnterpriseBeanICTest.java 2009-07-29 06:21:40 UTC (rev 3344)
@@ -43,21 +43,12 @@
@SpecAssertion(section = "3.10", id = "v")
public void testNewBeanHasNoProducerMethods() throws Exception
{
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- FoxLocal fox = getInstanceByType(FoxLocal.class);
- FoxLocal newFox = getInstanceByType(FoxLocal.class,new NewLiteral());
- fox.setNextLitterSize(3);
- newFox.setNextLitterSize(5);
- Litter theOnlyLitter = getInstanceByType(Litter.class,new AnnotationLiteral<Tame>(){});
- assert theOnlyLitter.getQuantity() == fox.getNextLitterSize();
- }
-
- }.run();
+ FoxLocal fox = getInstanceByType(FoxLocal.class);
+ FoxLocal newFox = getInstanceByType(FoxLocal.class,new NewLiteral());
+ fox.setNextLitterSize(3);
+ newFox.setNextLitterSize(5);
+ Litter theOnlyLitter = getInstanceByType(Litter.class,new AnnotationLiteral<Tame>(){});
+ assert theOnlyLitter.getQuantity() == fox.getNextLitterSize();
}
@Test(groups = { "new", "ri-broken" })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/remove/EnterpriseBeanRemoveMethodTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/remove/EnterpriseBeanRemoveMethodTest.java 2009-07-29 05:07:40 UTC (rev 3343)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/remove/EnterpriseBeanRemoveMethodTest.java 2009-07-29 06:21:40 UTC (rev 3344)
@@ -28,38 +28,22 @@
@SpecAssertion(section = "3.2.1", id = "a")
public void testApplicationMayCallAnyRemoveMethodOnDependentScopedSessionEnterpriseBeans() throws Exception
{
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- DependentSessionInterface sessionBean = getInstanceByType(DependentSessionInterface.class);
- sessionBean.remove();
- Bean<?> bean = getCurrentManager().getBeans(StateKeeper.class).iterator().next();
- StateKeeper stateKeeper = (StateKeeper)
- getCurrentManager().getReference(bean,StateKeeper.class, getCurrentManager().createCreationalContext(bean));
- assert stateKeeper.isRemoveCalled();
- }
- }.run();
+ DependentSessionInterface sessionBean = getInstanceByType(DependentSessionInterface.class);
+ sessionBean.remove();
+ Bean<?> bean = getCurrentManager().getBeans(StateKeeper.class).iterator().next();
+ StateKeeper stateKeeper = (StateKeeper)
+ getCurrentManager().getReference(bean,StateKeeper.class, getCurrentManager().createCreationalContext(bean));
+ assert stateKeeper.isRemoveCalled();
}
@Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle" })
@SpecAssertion(section = "3.2.1", id = "da")
public void testApplicationMayCallRemoveMethodOnDependentScopedSessionEnterpriseBeansButNoParametersArePassed() throws Exception
{
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- DependentSessionInterface sessionBean = getInstanceByType(DependentSessionInterface.class);
- sessionBean.anotherRemoveWithParameters("required", null);
- StateKeeper stateKeeper = getInstanceByType(StateKeeper.class);
- assert stateKeeper.isRemoveCalled();
- }
- }.run();
+ DependentSessionInterface sessionBean = getInstanceByType(DependentSessionInterface.class);
+ sessionBean.anotherRemoveWithParameters("required", null);
+ StateKeeper stateKeeper = getInstanceByType(StateKeeper.class);
+ assert stateKeeper.isRemoveCalled();
}
@Test(groups = { "enterpriseBeans", "removeMethod", "lifecycle" }, expectedExceptions = UnsupportedOperationException.class)
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java 2009-07-29 05:07:40 UTC (rev 3343)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/definition/ProducerFieldDefinitionTest.java 2009-07-29 06:21:40 UTC (rev 3344)
@@ -30,16 +30,10 @@
@SpecAssertion(section = "3.4", id = "fa")
public void testParameterizedReturnType() throws Exception
{
- new RunInDependentContext()
- {
- public void execute()
- {
- FunnelWeaverSpiderConsumer spiderConsumer = getInstanceByType(FunnelWeaverSpiderConsumer.class);
- assert spiderConsumer != null;
- assert spiderConsumer.getInjectedSpider() != null;
- assert spiderConsumer.getInjectedSpider().equals(FunnelWeaverSpiderProducer.getSpider());
- }
- }.run();
+ FunnelWeaverSpiderConsumer spiderConsumer = getInstanceByType(FunnelWeaverSpiderConsumer.class);
+ assert spiderConsumer != null;
+ assert spiderConsumer.getInjectedSpider() != null;
+ assert spiderConsumer.getInjectedSpider().equals(FunnelWeaverSpiderProducer.getSpider());
}
@Test(groups = { "producerField", "deployment" })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/ProducerFieldLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/ProducerFieldLifecycleTest.java 2009-07-29 05:07:40 UTC (rev 3343)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/ProducerFieldLifecycleTest.java 2009-07-29 06:21:40 UTC (rev 3344)
@@ -22,15 +22,7 @@
})
public void testProducerFieldNotAnotherBean()
{
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- assert getInstanceByType(BrownRecluse.class) != null;
- }
- };
+ assert getInstanceByType(BrownRecluse.class) != null;
}
@Test(groups = { "producerField" })
@@ -40,16 +32,8 @@
})
public void testProducerStaticFieldBean()
{
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- TarantulaConsumer tarantulaConsumer = getInstanceByType(TarantulaConsumer.class);
- assert tarantulaConsumer.getConsumedTarantula().equals(StaticTarantulaProducer.produceTarantula);
- }
- };
+ TarantulaConsumer tarantulaConsumer = getInstanceByType(TarantulaConsumer.class);
+ assert tarantulaConsumer.getConsumedTarantula().equals(StaticTarantulaProducer.produceTarantula);
}
@Test(groups = { "producerField" })
@@ -59,15 +43,8 @@
})
public void testProducerFieldBeanCreate() throws Exception
{
- new RunInDependentContext()
- {
- @Override
- protected void execute() throws Exception
- {
- BlackWidowConsumer spiderConsumer = getInstanceByType(BlackWidowConsumer.class);
- assert spiderConsumer.getInjectedSpider().equals(BlackWidowProducer.blackWidow);
- }
- }.run();
+ BlackWidowConsumer spiderConsumer = getInstanceByType(BlackWidowConsumer.class);
+ assert spiderConsumer.getInjectedSpider().equals(BlackWidowProducer.blackWidow);
}
@Test(groups = { "producerField", "specialization" })
@@ -77,16 +54,9 @@
})
public void testSpecializedBeanAlwaysUsed() throws Exception
{
- new RunInDependentContext()
- {
- @Override
- protected void execute() throws Exception
- {
- TarantulaConsumer spiderConsumer = getInstanceByType(TarantulaConsumer.class);
- assert spiderConsumer.getConsumedTarantula() != null;
- assert spiderConsumer.getConsumedTarantula() instanceof DefangedTarantula;
- }
- }.run();
+ TarantulaConsumer spiderConsumer = getInstanceByType(TarantulaConsumer.class);
+ assert spiderConsumer.getConsumedTarantula() != null;
+ assert spiderConsumer.getConsumedTarantula() instanceof DefangedTarantula;
}
@Test(groups = { "producerField" })
@@ -96,15 +66,8 @@
})
public void testProducerFieldReturnsNullIsDependent() throws Exception
{
- new RunInDependentContext()
- {
- @Override
- protected void execute() throws Exception
- {
- NullSpiderConsumer consumerBean = getInstanceByType(NullSpiderConsumer.class);
- assert consumerBean.getInjectedSpider() == null;
- }
- }.run();
+ NullSpiderConsumer consumerBean = getInstanceByType(NullSpiderConsumer.class);
+ assert consumerBean.getInjectedSpider() == null;
}
@Test(groups = { "producerField" }, expectedExceptions = IllegalProductException.class)
@@ -114,26 +77,19 @@
})
public void testProducerFieldReturnsNullIsNotDependent() throws Exception
{
- new RunInDependentContext()
+ NullSpiderConsumerForBrokenProducer consumer = getInstanceByType(NullSpiderConsumerForBrokenProducer.class);
+ // The injected spider is proxied since it is in the request scope.
+ // So to actually create the bean instance, we need to invoke
+ // some method on the proxy.
+ if (consumer.getInjectedSpider() == null)
{
- @Override
- protected void execute() throws Exception
- {
- NullSpiderConsumerForBrokenProducer consumer = getInstanceByType(NullSpiderConsumerForBrokenProducer.class);
- // The injected spider is proxied since it is in the request scope.
- // So to actually create the bean instance, we need to invoke
- // some method on the proxy.
- if (consumer.getInjectedSpider() == null)
- {
- // No proxy in this impl, and no exception = fail
- }
- else
- {
- // Proxy is assumed, so invoke some method
- consumer.getInjectedSpider().bite();
- }
- }
- }.run();
+ // No proxy in this impl, and no exception = fail
+ }
+ else
+ {
+ // Proxy is assumed, so invoke some method
+ consumer.getInjectedSpider().bite();
+ }
}
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/SimpleBeanDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/SimpleBeanDefinitionTest.java 2009-07-29 05:07:40 UTC (rev 3343)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/SimpleBeanDefinitionTest.java 2009-07-29 06:21:40 UTC (rev 3344)
@@ -1,11 +1,11 @@
package org.jboss.jsr299.tck.tests.implementation.simple.definition;
-import org.jboss.test.audit.annotations.SpecAssertion;
-import org.jboss.test.audit.annotations.SpecAssertions;
-import org.jboss.test.audit.annotations.SpecVersion;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.jsr299.tck.tests.implementation.simple.definition.OuterClass.InnerClass_NotBeean;
import org.jboss.jsr299.tck.tests.implementation.simple.definition.OuterClass.StaticInnerClass;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecAssertions;
+import org.jboss.test.audit.annotations.SpecVersion;
import org.jboss.testharness.impl.packaging.Artifact;
import org.testng.annotations.Test;
@@ -84,17 +84,9 @@
@SpecAssertion(section = "3.1.4.1", id = "a")
public void testInitializerAnnotatedConstructor() throws Exception
{
- new RunInDependentContext()
- {
- @Override
- protected void execute() throws Exception
- {
- Sheep.constructedCorrectly = false;
- getInstanceByType(Sheep.class);
- assert Sheep.constructedCorrectly;
-
- }
- }.run();
+ Sheep.constructedCorrectly = false;
+ getInstanceByType(Sheep.class);
+ assert Sheep.constructedCorrectly;
}
@Test
@@ -114,30 +106,14 @@
@SpecAssertion(section = "3.1.4.1", id = "a")
public void testInitializerAnnotatedConstructorUsedOverEmptyConstuctor() throws Exception
{
- new RunInDependentContext()
- {
- @Override
- protected void execute() throws Exception
- {
- getInstanceByType(Turkey.class);
- assert Turkey.constructedCorrectly;
- }
- }.run();
+ getInstanceByType(Turkey.class);
+ assert Turkey.constructedCorrectly;
}
@Test
@SpecAssertion(section = "3.1", id = "fa")
public void testDependentScopedBeanCanHavePublicField() throws Exception
{
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- assert getInstanceByType(Tiger.class).name.equals("pete");
- }
-
- }.run();
+ assert getInstanceByType(Tiger.class).name.equals("pete");
}
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java 2009-07-29 05:07:40 UTC (rev 3343)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/newSimpleBean/NewSimpleBeanTest.java 2009-07-29 06:21:40 UTC (rev 3344)
@@ -87,65 +87,37 @@
@SpecAssertion(section = "3.10", id = "w")
public void testNewBeanHasNoProducerFields() throws Exception
{
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- Fox fox = getInstanceByType(Fox.class);
- Fox newFox = getInstanceByType(Fox.class,new NewLiteral());
- newFox.setDen(new Den("NewFoxDen"));
- Den theOnlyDen = getInstanceByType(Den.class);
- assert theOnlyDen.getName().equals(fox.getDen().getName());
- }
-
- }.run();
-
+ Fox fox = getInstanceByType(Fox.class);
+ Fox newFox = getInstanceByType(Fox.class,new NewLiteral());
+ newFox.setDen(new Den("NewFoxDen"));
+ Den theOnlyDen = getInstanceByType(Den.class);
+ assert theOnlyDen.getName().equals(fox.getDen().getName());
}
@Test(groups = { "new" })
@SpecAssertion(section = "3.10", id = "v")
public void testNewBeanHasNoProducerMethods() throws Exception
{
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- Fox fox = getInstanceByType(Fox.class);
- Fox newFox = getInstanceByType(Fox.class,new NewLiteral());
- fox.setNextLitterSize(3);
- newFox.setNextLitterSize(5);
- Litter theOnlyLitter = getInstanceByType(Litter.class);
- assert theOnlyLitter.getQuantity() == fox.getNextLitterSize();
- }
-
- }.run();
+ Fox fox = getInstanceByType(Fox.class);
+ Fox newFox = getInstanceByType(Fox.class,new NewLiteral());
+ fox.setNextLitterSize(3);
+ newFox.setNextLitterSize(5);
+ Litter theOnlyLitter = getInstanceByType(Litter.class);
+ assert theOnlyLitter.getQuantity() == fox.getNextLitterSize();
}
@Test(groups = { "new" })
@SpecAssertion(section = "3.10", id = "x")
public void testNewBeanHasNoDisposerMethods() throws Exception
{
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- Fox fox = getInstanceByType(Fox.class);
- Fox newFox = getInstanceByType(Fox.class,new NewLiteral());
- Bean<Litter> litterBean = getBeans(Litter.class).iterator().next();
- CreationalContext<Litter> creationalContext = getCurrentManager().createCreationalContext(litterBean);
- Litter litter = getInstanceByType(Litter.class);
- litterBean.destroy(litter, creationalContext);
- assert fox.isLitterDisposed();
- assert !newFox.isLitterDisposed();
- }
-
- }.run();
+ Fox fox = getInstanceByType(Fox.class);
+ Fox newFox = getInstanceByType(Fox.class,new NewLiteral());
+ Bean<Litter> litterBean = getBeans(Litter.class).iterator().next();
+ CreationalContext<Litter> creationalContext = getCurrentManager().createCreationalContext(litterBean);
+ Litter litter = getInstanceByType(Litter.class);
+ litterBean.destroy(litter, creationalContext);
+ assert fox.isLitterDisposed();
+ assert !newFox.isLitterDisposed();
}
@Test
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/EnterpriseBeanSpecializationIntegrationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/EnterpriseBeanSpecializationIntegrationTest.java 2009-07-29 05:07:40 UTC (rev 3343)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/inheritance/specialization/enterprise/EnterpriseBeanSpecializationIntegrationTest.java 2009-07-29 06:21:40 UTC (rev 3344)
@@ -32,17 +32,8 @@
})
public void testSpecializedBeanNotInstantiated() throws Exception
{
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- FarmerLocal farmer = getInstanceByType(FarmerLocal.class,LANDOWNER_LITERAL);
- assert farmer.getClassName().equals(LazyFarmer.class.getName());
- }
-
- }.run();
+ FarmerLocal farmer = getInstanceByType(FarmerLocal.class,LANDOWNER_LITERAL);
+ assert farmer.getClassName().equals(LazyFarmer.class.getName());
}
@@ -50,16 +41,7 @@
@SpecAssertion(section="4.3.2", id = "a")
public void testProducerMethodOnSpecializedBeanCalledOnSpecializingBean() throws Exception
{
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- assert getBeans(Waste.class).size() == 1;
- assert getInstanceByType(Waste.class).getFrom().equals(Office.class.getName());
- }
-
- }.run();
+ assert getBeans(Waste.class).size() == 1;
+ assert getInstanceByType(Waste.class).getFrom().equals(Office.class.getName());
}
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/byname/ResolutionByNameTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/byname/ResolutionByNameTest.java 2009-07-29 05:07:40 UTC (rev 3343)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/byname/ResolutionByNameTest.java 2009-07-29 06:21:40 UTC (rev 3344)
@@ -34,19 +34,11 @@
// WBRI-306
public void testAmbiguousELNamesResolved() throws Exception
{
- new RunInDependentContext()
- {
- @Override
- protected void execute() throws Exception
- {
- // Cod, Plaice and AlaskaPlaice are named "whitefish" - Cod is a not-enabled policy, AlaskaPlaice specializes Plaice
- assert getCurrentManager().getBeans("whitefish").size() == 1;
- assert getCurrentManager().getBeans("whitefish").iterator().next().getTypes().contains(AlaskaPlaice.class);
- // Both Salmon and Sole are named "fish" - Sole is an enabled policy
- assert getCurrentManager().getBeans("fish").size() == 1;
- assert getCurrentManager().getBeans("fish").iterator().next().getTypes().contains(Sole.class);
- }
-
- }.run();
+ // Cod, Plaice and AlaskaPlaice are named "whitefish" - Cod is a not-enabled policy, AlaskaPlaice specializes Plaice
+ assert getCurrentManager().getBeans("whitefish").size() == 1;
+ assert getCurrentManager().getBeans("whitefish").iterator().next().getTypes().contains(AlaskaPlaice.class);
+ // Both Salmon and Sole are named "fish" - Sole is an enabled policy
+ assert getCurrentManager().getBeans("fish").size() == 1;
+ assert getCurrentManager().getBeans("fish").iterator().next().getTypes().contains(Sole.class);
}
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java 2009-07-29 05:07:40 UTC (rev 3343)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java 2009-07-29 06:21:40 UTC (rev 3344)
@@ -63,27 +63,21 @@
}
@Test
@SpecAssertion(section="5.5.2", id="ab")
- public void testInactiveScope() throws Exception {
- new RunInDependentContext()
- {
- @Override
- protected void execute() throws Exception
- {
- assert getCurrentConfiguration().getContexts().getRequestContext().isActive();
- setContextInactive(getCurrentConfiguration().getContexts().getRequestContext());
- assert !getCurrentConfiguration().getContexts().getRequestContext().isActive();
- try {
- getInstanceByType(TunedTuna.class).getState();
- assert false;
- } catch (ContextNotActiveException cnae) {
- } catch (IllegalStateException ise) {
- } catch (Throwable t) {
- assert false;
- }
-
- // TODO need to set request scope active again, some other tests will fail otherwise
- setContextActive(getCurrentConfiguration().getContexts().getRequestContext());
- }
- }.run();
+ public void testInactiveScope() throws Exception
+ {
+ assert getCurrentConfiguration().getContexts().getRequestContext().isActive();
+ setContextInactive(getCurrentConfiguration().getContexts().getRequestContext());
+ assert !getCurrentConfiguration().getContexts().getRequestContext().isActive();
+ try {
+ getInstanceByType(TunedTuna.class).getState();
+ assert false;
+ } catch (ContextNotActiveException cnae) {
+ } catch (IllegalStateException ise) {
+ } catch (Throwable t) {
+ assert false;
+ }
+
+ // TODO need to set request scope active again, some other tests will fail otherwise
+ setContextActive(getCurrentConfiguration().getContexts().getRequestContext());
}
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java 2009-07-29 05:07:40 UTC (rev 3343)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/InjectionTest.java 2009-07-29 06:21:40 UTC (rev 3344)
@@ -26,32 +26,18 @@
@SpecAssertion(section="4.2", id = "aa")
public void testFieldDeclaredInSuperclassInjected() throws Exception
{
- new RunInDependentContext()
- {
- @Override
- protected void execute() throws Exception
- {
- DeluxeHenHouse henHouse = getInstanceByType(DeluxeHenHouse.class);
- assert henHouse.fox != null;
- assert henHouse.fox.getName().equals("gavin");
- }
- }.run();
+ DeluxeHenHouse henHouse = getInstanceByType(DeluxeHenHouse.class);
+ assert henHouse.fox != null;
+ assert henHouse.fox.getName().equals("gavin");
}
@Test
@SpecAssertion(section="4.2", id = "ac")
public void testFieldDeclaredInIndirectSuperclassInjected() throws Exception
{
- new RunInDependentContext()
- {
- @Override
- protected void execute() throws Exception
- {
- MegaPoorHenHouse henHouse = getInstanceByType(MegaPoorHenHouse.class);
- assert henHouse.fox != null;
- assert henHouse.fox.getName().equals("gavin");
- }
- }.run();
+ MegaPoorHenHouse henHouse = getInstanceByType(MegaPoorHenHouse.class);
+ assert henHouse.fox != null;
+ assert henHouse.fox.getName().equals("gavin");
}
@Test(groups = {"injection", "underInvestigation"})
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/PolicyAvailabilityTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/PolicyAvailabilityTest.java 2009-07-29 05:07:40 UTC (rev 3343)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/policy/PolicyAvailabilityTest.java 2009-07-29 06:21:40 UTC (rev 3344)
@@ -45,40 +45,26 @@
// WBRI-306
public void testPolicyAvailability() throws Exception
{
- new RunInDependentContext()
- {
- @Override
- protected void execute() throws Exception
- {
- Set<Bean<Animal>> animals = getBeans(Animal.class);
- Set<Type> types = new HashSet<Type>();
- for (Bean<Animal> animal : animals) {
- types.addAll(animal.getTypes());
- }
- assert types.contains(Chicken.class);
- assert types.contains(Cat.class);
- assert !types.contains(Horse.class);
- assert !types.contains(Dog.class);
-
- assert getCurrentManager().getBeans("cat").size() == 1;
- assert getCurrentManager().getBeans("dog").size() == 0;
- }
- }.run();
+ Set<Bean<Animal>> animals = getBeans(Animal.class);
+ Set<Type> types = new HashSet<Type>();
+ for (Bean<Animal> animal : animals) {
+ types.addAll(animal.getTypes());
+ }
+ assert types.contains(Chicken.class);
+ assert types.contains(Cat.class);
+ assert !types.contains(Horse.class);
+ assert !types.contains(Dog.class);
+
+ assert getCurrentManager().getBeans("cat").size() == 1;
+ assert getCurrentManager().getBeans("dog").size() == 0;
}
@Test(groups = {"policy"})
@SpecAssertion(section = "5.2", id = "g")
public void testAnyEnabledPolicyStereotypeMakesPolicyEnabled() throws Exception
{
- new RunInDependentContext()
- {
- @Override
- protected void execute() throws Exception
- {
- assert getBeans(Bird.class).size() == 1;
- assert getCurrentManager().getBeans("bird").size() == 1;
- }
- }.run();
+ assert getBeans(Bird.class).size() == 1;
+ assert getCurrentManager().getBeans("bird").size() == 1;
}
@Test(groups = {"policy", "ri-broken"})
@@ -86,14 +72,7 @@
// WBRI-306
public void testProducerPolicies() throws Exception
{
- new RunInDependentContext()
- {
- @Override
- protected void execute() throws Exception
- {
- assert getBeans(Sheep.class, new AnnotationLiteral<Wild>(){}).size() == 2;
- assert getBeans(Sheep.class, new AnnotationLiteral<Tame>(){}).size() == 0;
- }
- }.run();
+ assert getBeans(Sheep.class, new AnnotationLiteral<Wild>(){}).size() == 2;
+ assert getBeans(Sheep.class, new AnnotationLiteral<Tame>(){}).size() == 0;
}
}
14 years, 9 months
[webbeans-commits] Webbeans SVN: r3343 - tck/trunk/doc/reference/en-US.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-07-29 01:07:40 -0400 (Wed, 29 Jul 2009)
New Revision: 3343
Modified:
tck/trunk/doc/reference/en-US/configuration.xml
Log:
update xref
Modified: tck/trunk/doc/reference/en-US/configuration.xml
===================================================================
--- tck/trunk/doc/reference/en-US/configuration.xml 2009-07-29 04:40:05 UTC (rev 3342)
+++ tck/trunk/doc/reference/en-US/configuration.xml 2009-07-29 05:07:40 UTC (rev 3343)
@@ -35,7 +35,7 @@
You should set the following properties:
</para>
<table frame="all">
- <title />
+ <title>Required JBoss Test Harness Configuration Properties</title>
<tgroup cols="2">
<colspec colnum="1" colname="property" colwidth="5*" />
<colspec colnum="2" colname="description" colwidth="2*" />
@@ -213,7 +213,7 @@
It's beyond the scope of this guide to describe in how to set up your
build environment to run the TCK. The JBoss Test Harness guide
describes how Web Beans uses Maven 2 to execute the CDI TCK. See
- <xref linkend="testsuite-runner" />. The TestNG documentation provides
+ <xref linkend="test-suite-runner" />. The TestNG documentation provides
extensive information on launching TestNG using the Java, Ant, Eclipse
or IntellJ IDEA.
</para>
14 years, 9 months
[webbeans-commits] Webbeans SVN: r3342 - tck/trunk/doc/reference/en-US.
by webbeans-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-07-29 00:40:05 -0400 (Wed, 29 Jul 2009)
New Revision: 3342
Modified:
tck/trunk/doc/reference/en-US/Author_Group.xml
tck/trunk/doc/reference/en-US/Book_Info.xml
tck/trunk/doc/reference/en-US/Book_Preface.xml
tck/trunk/doc/reference/en-US/configuration.xml
tck/trunk/doc/reference/en-US/eclipse-debugging.xml
tck/trunk/doc/reference/en-US/eclipse-running.xml
tck/trunk/doc/reference/en-US/executing.xml
tck/trunk/doc/reference/en-US/installation.xml
tck/trunk/doc/reference/en-US/introduction.xml
tck/trunk/doc/reference/en-US/master.xml
tck/trunk/doc/reference/en-US/part-background.xml
tck/trunk/doc/reference/en-US/part-execution.xml
tck/trunk/doc/reference/en-US/part-test-harness.xml
tck/trunk/doc/reference/en-US/reporting.xml
Log:
minor revisions and rephrasings
some reformatting as needed
Modified: tck/trunk/doc/reference/en-US/Author_Group.xml
===================================================================
--- tck/trunk/doc/reference/en-US/Author_Group.xml 2009-07-29 03:14:19 UTC (rev 3341)
+++ tck/trunk/doc/reference/en-US/Author_Group.xml 2009-07-29 04:40:05 UTC (rev 3342)
@@ -28,4 +28,7 @@
<orgname>Red Hat Middleware LLC</orgname>
</affiliation>
</author>
+<!--
+vim: ts=3:sw=3:tw=80:set expandtab
+-->
</authorgroup>
Modified: tck/trunk/doc/reference/en-US/Book_Info.xml
===================================================================
--- tck/trunk/doc/reference/en-US/Book_Info.xml 2009-07-29 03:14:19 UTC (rev 3341)
+++ tck/trunk/doc/reference/en-US/Book_Info.xml 2009-07-29 04:40:05 UTC (rev 3342)
@@ -22,4 +22,7 @@
Dependency Injection for Java EE</title>
<subtitle>Specification Lead: Red Hat Middleware LLC</subtitle>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Author_Group.xml" />
+<!--
+vim: ts=3:sw=3:tw=80:set expandtab
+-->
</bookinfo>
Modified: tck/trunk/doc/reference/en-US/Book_Preface.xml
===================================================================
--- tck/trunk/doc/reference/en-US/Book_Preface.xml 2009-07-29 03:14:19 UTC (rev 3341)
+++ tck/trunk/doc/reference/en-US/Book_Preface.xml 2009-07-29 04:40:05 UTC (rev 3342)
@@ -145,4 +145,7 @@
</listitem>
</itemizedlist>
</section>
+<!--
+vim: ts=3:sw=3:tw=80:set expandtab
+-->
</preface>
Modified: tck/trunk/doc/reference/en-US/configuration.xml
===================================================================
--- tck/trunk/doc/reference/en-US/configuration.xml 2009-07-29 03:14:19 UTC (rev 3341)
+++ tck/trunk/doc/reference/en-US/configuration.xml 2009-07-29 04:40:05 UTC (rev 3342)
@@ -12,7 +12,7 @@
</para>
<para>
- This guide does not discuss in detail how to use the TCK in standalone
+ This chapter does not discuss in detail how to use the TCK in standalone
mode. The JBoss Test Harness guide provides more on running in standalone
mode.
</para>
@@ -219,4 +219,7 @@
</para>
</section>
+<!--
+vim: ts=3:sw=3:tw=80:set expandtab
+-->
</chapter>
Modified: tck/trunk/doc/reference/en-US/eclipse-debugging.xml
===================================================================
--- tck/trunk/doc/reference/en-US/eclipse-debugging.xml 2009-07-29 03:14:19 UTC (rev 3341)
+++ tck/trunk/doc/reference/en-US/eclipse-debugging.xml 2009-07-29 04:40:05 UTC (rev 3342)
@@ -3,25 +3,24 @@
<chapter id="eclipse-debugging">
<title>Debugging Tests in Eclipse</title>
<para>
- This chapter explains how to debug standalone tests and integration
- tests from the TCK test suite in Eclipse. You should be able to use the
- lessons learned here to debug tests in an alternate IDE.
+ This chapter explains how to debug standalone and integration tests from
+ the TCK test suite in Eclipse. You should be able to use the lessons
+ learned here to debug tests in an alternate IDE as well.
</para>
<section>
<title>Debugging a standalone test</title>
<para>
There is almost no difference in how you debug a standalone test
from how you run it. With the test class open in the Eclipse editor,
- simply right click in the editor view and select TestNG > Debug as
- test. Eclipse will stop at any breakpoints you set just like it would
+ simply right click in the editor view and select Debug As > TestNG
+ Test. Eclipse will stop at any breakpoints you set just like it would
with any other local debug process.
</para>
<para>
- If you plan to step into a class in a Web Beans implementation (or
- any other dependent library), you must ensure that the source is
- properly associated with the library. Below are the steps to follow to
- associate the source of the Web Beans with the TestNG debug
- configuration:
+ If you plan to step into a class in a Web Beans implementation (or any
+ other dependent library), you must ensure that the source is properly
+ associated with the library. Below are the steps to follow to associate
+ the source of Web Beans with the TestNG debug configuration:
</para>
<orderedlist>
<listitem>
@@ -81,10 +80,10 @@
<section>
<title>Debugging an integration test</title>
<para>
- In order to debug an integration test, or any test run in in-container
+ In order to debug an integration test, or any test run using in-container
mode, the test must be configured to run in-container, as described in
- <xref linkend="eclipse-in-container" />
- , and you must attach the IDE debugger to the container. That puts the
+ <xref linkend="eclipse-in-container" />,
+ and you must attach the IDE debugger to the container. That puts the
debugger on both sides of the fence, so to speak.
</para>
<para>
@@ -115,7 +114,7 @@
See
<ulink
url="http://maverikpro.wordpress.com/2007/11/26/remote-debug-a-web-application...">this blog entry</ulink>
- to learn how to start JBoss with JPDA enabled and how to get the
+ to learn how to start JBoss AS with JPDA enabled and how to get the
Eclipse debugger to connect to the remote process.
</para>
</section>
@@ -123,20 +122,25 @@
<title>Launching the test in the debugger</title>
<para>
Once Eclipse is debugging the container, you can set a breakpoint in
- the test and debug it just like a standalone test. Open a test
- annotated with
- <literal>@IntegrationTest</literal>
- in the Eclipse editor, right click in the editor view, and select
- TestNG > Debug as test. The only difference is that when the IDE
- hits the breakpoint this time, it halts the JVM thread of the
- container rather than the thread that launched the test.
+ the test and debug it just like a standalone test. Let's give it a
+ try.
</para>
<para>
+ Open a test annotated with <literal>@IntegrationTest</literal> in
+ the Eclipse editor, right click in the editor view, and select Debug
+ As > TestNG Test. This time when the IDE hits the breakpoint, it
+ halts the JVM thread of the container rather than the thread that
+ launched the test.
+ </para>
+ <para>
Remember that if you need to debug into dependent libraries, the
- source code for those libraries needs to be registered with the
+ source code for those libraries will need to be registered with the
TestNG debug configuration as described in the first section in this
chapter.
</para>
</section>
</section>
+<!--
+vim: ts=3:sw=3:tw=80:set expandtab
+-->
</chapter>
Modified: tck/trunk/doc/reference/en-US/eclipse-running.xml
===================================================================
--- tck/trunk/doc/reference/en-US/eclipse-running.xml 2009-07-29 03:14:19 UTC (rev 3341)
+++ tck/trunk/doc/reference/en-US/eclipse-running.xml 2009-07-29 04:40:05 UTC (rev 3342)
@@ -7,31 +7,31 @@
TestNG plugin. It covers running non-integration tests in standalone mode
and integration tests (as well as non-integration tests) in in-container
mode. You should be able to use the lessons learned here to debug tests in
- an alternate IDE.
+ an alternate IDE as well.
</para>
<section>
<title>Leveraging Eclipse's plugin ecosystem</title>
<para>
- Using an existing test harness allows the tests to be executed and
- debugged in an Integrated Development Environment (IDE) using available
- plugins. Using an IDE is also the easiest way to execute a test class
- in isolation.
+ Using an existing test harness (TestNG) allows the tests to be executed
+ and debugged in an Integrated Development Environment (IDE) using
+ available plugins. Using an IDE is also the easiest way to execute a
+ test class in isolation.
+
</para>
<para>
- The TCK can be executed in any IDE for which there is a TestNG
- plugin available. Running a test in Eclipse is almost as simple as
- running the test with the Eclipse TestNG plugin. You can also use the
- plugin to debug a test, which is described in the next chapter.
+ The TCK can be executed in any IDE for which there is a TestNG plugin
+ available. Running a test from the CDI TCK test suite using the Eclipse
+ TestNG plugin is almost as simple as running any other TestNG test. You
+ can also use the plugin to debug a test, which is described in the next
+ chapter.
</para>
<para>
Before running a test from the TCK test suite in Eclipse, you must have
- the Eclipse
- <ulink url="http://testng.org">TestNG plugin</ulink>
- and should either install the m2eclipse plugin installed or use the
- <literal>maven-eclipse-plugin</literal>
- . Refer to
- <xref linkend="eclipse-plugins" />
- for more information on these plugins.
+ the Eclipse <ulink url="http://testng.org">TestNG plugin</ulink> and
+ either the m2eclipse plugin or an Eclipse project generated use the
+ Maven 2 Eclipse plugin (<literal>maven-eclipse-plugin</literal>). Refer
+ to <xref linkend="eclipse-plugins" /> for more information on these
+ plugins.
</para>
<para>
@@ -43,10 +43,9 @@
</para>
<tip>
<para>
- If you choose to use the
- <literal>maven-eclipse-plugin</literal>
- you
- should execute the plugin in both the tck and webbeans:
+ If you choose to use the Maven 2 Eclipse plugin
+ (<literal>maven-eclipse-plugin</literal>), you should execute the
+ plugin in both the tck and webbeans projects:
</para>
<programlisting><![CDATA[cd tck
mvn clean eclipse:clean eclipse:eclipse -DdownloadSources -DdownloadJavadocs
@@ -57,15 +56,39 @@
<section>
<title>Readying the Eclipse workspace</title>
<para>
- When setting up your Ecilpse workspace, I recommend creating three
- workings sets: one for the Web Beans, one for the CDI TCK and one for
- the JBoss TCK Runner. The dependencies between the projects will be
- established (either automatically by the m2eclipse plugin based on the
- dependency information in the pom.xml files, or previously created by
- the
- <literal>maven-eclipse-plugin</literal>
- . Your workspace should appear as follows:
+ When setting up your Ecilpse workspace, we recommended creating three
+ workings sets:
</para>
+ <orderedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold">Web Beans</emphasis> - Groups the CDI API
+ and the CDI RI (i.e., Web Beans) projects
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">CDI TCK</emphasis> - Groups the CDI TCK
+ API and the test suite projects
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">Web Beans JBoss TCK Runner</emphasis> -
+ Groups the porting package implementation and TCK runner projects
+ that are configured to certify Web Beans deployed on JBoss AS 5.1
+ </para>
+ </listitem>
+ </orderedlist>
+ <para>
+ The dependencies between the projects will either be established
+ automatically by the m2eclipse plugin, based on the dependency
+ information in the pom.xml files, or as generated by the <literal>mvn
+ eclipse:eclipse</literal> command.
+ </para>
+ <para>
+ Your workspace should appear as follows:
+ </para>
<programlisting><![CDATA[Web Beans
jsr299-api
webbeans-api
@@ -78,19 +101,20 @@
CDI TCK
jsr299-tck-api
jsr299-tck-impl
- parent
+ jsr299-tck-parent
Web Beans JBoss TCK Runner
webbeans-jboss-tck-runner
webbeans-porting-package]]></programlisting>
<para>
The tests in the TCK test suite are located in the jsr299-tck-impl
project. You'll be working within this project in Eclipse when you are
- developing tests. However, you learned earlier, there are no references
+ developing tests. However, as you learned earlier, there are no references
to a CDI implementation in the TCK. So how can you execute an
individual test in Eclipse? The secret is that you need to establish a
link in Eclipse (not in Maven) between the jsr299-tck-impl project and
your TCK runner project, which in this case is
- webbeans-jboss-tck-runner.
+ webbeans-jboss-tck-runner (the project in the jboss-tck-runner
+ directory).
</para>
<para>
Here are the steps to establish the link:
@@ -135,16 +159,19 @@
</orderedlist>
<para>
Of course, the webbeans-jboss-tck-runner also depends on the
- jsr299-tck-impl at runtime (so that it can actually access the tests to
- execute). So, now we have a cycle in the dependency graph, and in all
- likelihood Eclipse will refuse to compile one or more projects.
- However,
- <emphasis>we</emphasis>
- don't need the TCK runner to access tests when debugging (we'll use the
- TestNG plugin to execute the tests) - we just need access to it's
- classes, configuration, and other dependencies. So, we remove it's
- dependence on the jsr299-tck-impl project:
+ jsr299-tck-impl at runtime (so it can actually find the tests to
+ execute). But Eclipse doesn't distinguish between build-time and
+ runtime dependencies. As a result, we've created a circular dependency
+ between the projects. In all likelihood, Eclipse will struggle (if not
+ fail) to compile one or more projects. How can we break this cycle?
</para>
+ <para>
+ As it turns out, the TCK runner doesn't need to access the tests to
+ build. It only needs its classes, configurations and other dependenices
+ at runtime (when the TestNG plugin executes). Therefore, we can remove
+ the TCK runner's dependence on the jsr299-tck-impl project by following
+ these steps:
+ </para>
<orderedlist>
<listitem>
<para>
@@ -161,7 +188,6 @@
Click on the Projects tab
</para>
</listitem>
- a
<listitem>
<para>
Select the TCK tests project (jsr299-tck-impl)
@@ -178,19 +204,22 @@
</para>
</listitem>
</orderedlist>
+ <para>
+ You are now ready to execute an individual test class (or artifact).
+ Let's start with a test artifact capable of running in standalone mode.
+ </para>
</section>
<section>
<title>Running a test in standalone mode</title>
<para>
- Your now ready to execute an individual test class (a class which
- extends AbstractJSR299Test and is annotated with @Artifact). Select a
- test class that is
- <emphasis role="italic">not</emphasis>
- annotated with
- <literal>@IntegrationTest</literal>
- and open it in the Eclipse editor. Right click in the editor view and
- select TestNG > Run as test. The TestNG view should pop out and you
- should see all the tests pass (hopefully).
+ A standalone test artifact is a class which extends
+ <literal>AbstractJSR299Test</literal>, is annotated with
+ <literal>@Artifact</literal>, but is <emphasis
+ role="italic">not</emphasis> annotated with
+ <literal>@IntegrationTest</literal>. Select a standalone test artifact
+ and open it in the Eclipse editor. Now right click in the editor view
+ and select Run As > TestNG Test. The TestNG view should pop out and
+ you should see all the tests in that artifact pass (if all goes well).
</para>
<note>
<para>
@@ -201,15 +230,16 @@
</note>
<para>
So far you have executed a test in standalone mode. That's not
- sufficient to pass the TCK. The test must be executed in in-container
- mode. Using in-container mode is also the only way to execute a test
- annotated with
- <literal>@IntegrationTest</literal>
- as it requires container resources. So let's see what has to be done to
- execute an integration test. This will result in the artifact being
- deployed to the container, which is JBoss AS 5.1 if you are using the
- JBoss TCK runner.
+ sufficient to pass the TCK. The test must be executed using
+ in-container mode. Using in-container mode is also the only way to
+ execute a test annotated with <literal>@IntegrationTest</literal>
+ (that's what the annotation means) as it requires container resources.
</para>
+ <para>
+ Let's see what has to be done to execute an integration test. This
+ will result in the artifact being deployed to the container, which is
+ JBoss AS 5.1 if you are using the JBoss TCK runner.
+ </para>
</section>
<section id="eclipse-in-container">
<title>Running integration tests</title>
@@ -228,15 +258,14 @@
<para>
The JBoss TCK runner project conveniently provides the properties file
src/test/debug-resources/META-INF/jboss-test-harness.properties that
- contains all of the necessary properties. Assuming you followed the
- recommended directory structure, you are good to go, otherwise you may
- have to tune the
- <literal>org.jboss.testharness.container.extraConfigurationDir
- </literal>
- and
- <literal>org.jboss.testharness.libraryDirectory</literal>
- properties to point to the relative location of the related projects.
- The properties should be defined as follows:
+ contains all of the necessary properties for in-container testing in
+ Eclipse. Assuming you followed the directory structure recommended in
+ <xref linkend="tck-environment"/>, you are good to go. Otherwise, you
+ may have to tune the
+ <literal>org.jboss.testharness.container.extraConfigurationDir</literal> and
+ <literal>org.jboss.testharness.libraryDirectory</literal> properties to
+ point to the relative location of the related projects. The properties
+ should be defined as follows:
</para>
<itemizedlist>
<listitem>
@@ -266,23 +295,16 @@
orjboss.testharness.container.forceRestart=false
orjboss.testharness.runIntegrationTests=true</programlisting>
<para>
- You're
- now ready to execute an integration test. Select an integration
- test (a
- class that extends
- <literal>AbstractJSR299Test</literal>
- and is annotated with both
- <literal>@Artifact</literal>
- and
- <literal>@IntegrationTest</literal>
- ) and open it in your Eclipse editor. Follow these steps to execute the
- class with the TestNG plugin:
+ You're now ready to execute an integration test. Select an integration
+ test (a class that extends <literal>AbstractJSR299Test</literal> and is
+ annotated with both <literal>@Artifact</literal> and
+ <literal>@IntegrationTest</literal>) and open it in your Eclipse
+ editor. Follow these steps to execute the class with the TestNG plugin:
</para>
<orderedlist>
<listitem>
<para>
- Right click in the editor view and select TestNG > Run as
- test
+ Right click in the editor view and select Run As > TestNG Test
</para>
</listitem>
<listitem>
@@ -357,7 +379,7 @@
appropriately).
</para>
<para>
- You can simply right click and select TestNG > Run as test for
+ You can simply right click and select Run As > TestNG Test for
all subsequent runs for the reason cited earlier, the run configuration
for a class is retained indefinitely.
</para>
@@ -406,8 +428,7 @@
</listitem>
</orderedlist>
<para>
- Now you don't have to do any special configuration for each test
- class.
+ Now you don't have to do any special configuration per test class.
</para>
<para>
You can stop the individual tests from running in-container by
@@ -420,4 +441,7 @@
debug a test so that you can efficiently investigate test failures.
</para>
</section>
+<!--
+vim: ts=3:sw=3:tw=80:set expandtab
+-->
</chapter>
Modified: tck/trunk/doc/reference/en-US/executing.xml
===================================================================
--- tck/trunk/doc/reference/en-US/executing.xml 2009-07-29 03:14:19 UTC (rev 3341)
+++ tck/trunk/doc/reference/en-US/executing.xml 2009-07-29 04:40:05 UTC (rev 3342)
@@ -3,11 +3,11 @@
<chapter id="executing">
<title>Executing the Test Suite</title>
<para>
- This chapter explains how to run the TCK on Web Beans as well as your
- own implementation. The CDI TCK uses the Maven 2 TestNG plugin and the
- JBoss Test Harness to execute the test suite. Learning to execute the test
- suite from Maven 2 is prerequisite knowlege for running the tests in an
- IDE, such as Eclipse.
+ This chapter explains how to run the TCK on Web Beans as well as your own
+ implementation. The CDI TCK uses the Maven 2 TestNG plugin and the JBoss
+ Test Harness to execute the test suite. Learning to execute the test suite
+ from Maven 2 is prerequisite knowlege for running the tests in an IDE,
+ such as Eclipse.
</para>
<section>
<title>The Test Suite Runner</title>
@@ -19,21 +19,26 @@
includes a TCK runner project that executes the CDI TCK on Web Beans
running inside JBoss AS 5.1. To execute the CDI TCK on your own CDI
implementation, you could modify the TCK runner project included with
- Web Beans to use your CDI implementation as described in
- <xref linkend="configuration" />
+ Web Beans to use your CDI implementation as described in <xref
+ linkend="configuration" />.
</para>
</section>
<section>
<title>Running the Tests In Standalone Mode</title>
<para>
- To execute the TCK test suite against the Web Beans, first switch
- to
- the jboss-tck-runner directory in the extracted Web Beans
- distribution:
+ To execute the TCK test suite against Web Beans, first switch to the
+ jboss-tck-runner directory in the extracted Web Beans distribution:
</para>
<programlisting>cd webbeans/jboss-tck-runner</programlisting>
+ <note>
+ <para>
+ These instructions assume you have extracted the CDI-related
+ software according to the recommendation given in <xref
+ linkend="tck-environment"/>.
+ </para>
+ </note>
<para>
Then execute the Maven 2 life cycle through the test phase:
</para>
@@ -48,56 +53,49 @@
SPI to invoke the test artifact within a mock Java EE life cycle and
capture the results of the test. However, passing the suite in this
mode is not sufficient to pass the TCK as a whole. The suite must be
- passed while executing in in-container mode.
+ passed while executing using the in-container mode.
</para>
</section>
<section>
<title>Running the Tests In the Container</title>
<para>
To execute the test suite using in-container mode with the JBoss TCK
- runner, you first have to setup JBoss AS as described in
- <xref linkend="tck-in-jboss-as" />.
+ runner, you first have to setup JBoss AS as described in the
+ <xref linkend="tck-in-jboss-as" /> callout.
</para>
<para>
- Then, execute the TCK runner:
+ Then, execute the TCK runner with Maven 2 as follows:
</para>
<programlisting>mvn test -Dincontainer</programlisting>
<para>
- The presence of the
- <literal>incontainer</literal>
- property activates a Maven 2 profile that assigns the
- <literal>org.jboss.testharness.standalone</literal>
- system property to
- <literal>false</literal>
- and the
- <literal>org.jboss.testharness.runIntegrationTests</literal>
- system property to
- <literal>true</literal>
- , hence activating the in-container test mode. This time, all the test
- artifacts in the test suite are executed.
+ The presence of the <literal>incontainer</literal> property activates a
+ Maven 2 profile that assigns the
+ <literal>org.jboss.testharness.standalone</literal> system property to
+ <literal>false</literal> and the
+ <literal>org.jboss.testharness.runIntegrationTests</literal> system
+ property to <literal>true</literal>, hence activating the in-container
+ test mode. This time, all the test artifacts in the test suite are
+ executed.
</para>
<para>
The in-container profile will also start and stop the application
- server automatically by setting the
- <literal>org.jboss.testharness.container.forceRestart</literal>
- to
+ server automatically, a feature which the profile activates by setting
+ the <literal>org.jboss.testharness.container.forceRestart</literal> to
<literal>true</literal>.
</para>
<para>
- The in-container mode uses the
- <literal>Containers</literal>
- SPI to deploy the test artifact to the container and execute the test
- in a true Java EE life cycle. The JBoss TCK runner has a dependency on
- the library that provides an implementation of this interface for JBoss
- AS 5.1.
+ The in-container mode uses the <literal>Containers</literal> SPI to
+ deploy the test artifact to the container and execute the test in a
+ true Java EE life cycle. The JBoss TCK runner has a dependency on the
+ library that provides an implementation of this interface for JBoss AS
+ 5.1.
</para>
<para>
- Since in-container tests are executed in a remote JVM, the results
- of
+ Since in-container tests are executed in a remote JVM, the results of
the test must be communicated back to the runner over a
container-supported protocol. The JBoss Test Harness provides
- servlet-based communication over HTTP as described in
- <xref linkend="incontainer-communication" />
+ servlet-based communication over HTTP as described in <xref
+ linkend="incontainer-communication" />.
</para>
</section>
<section>
@@ -107,27 +105,28 @@
in-container mode, each test class is packaged as a deployable artifact
and deployed to the container. The test is then executed within the
context of the deployed application. This leaves room for errors in
- packaging. When investigating a test failure, it's helpful to be able
- to inspect the artifact after it is generated. The TCK can accommodate
+ packaging. When investigating a test failure, you may find it helpful
+ to inspect the artifact after it's generated. The TCK can accommodate
this type of inspection by "dumping" the generated artifact to disk.
</para>
<para>
- This behavior is activated in the jboss-tck-runner project by appending
- the
- <literal>dumpArtifacts</literal>
- command line property to the end of the command that invokes the Maven
- test phase.
+ The feature just described is activated in the jboss-tck-runner project
+ by appending the <literal>dumpArtifacts</literal> command line property
+ to the end of the command that invokes the Maven 2 test phase.
</para>
<programlisting>mvn test-compile -DdumpArtifacts</programlisting>
<para>
- The output directory where the artifacts are written is configured to
- dump the artifacts to the
- <literal>target/jsr299-artifacts</literal>
- directory.
+ The directory where the artifacts get written is configured using the
+ <literal>org.jboss.testharness.outputDirectory</literal> property. The
+ <literal>dumpArtifacts</literal> profile in the jboss-tck-runner
+ project sets this value to the relative directory path
+ <literal>target/jsr299-artifacts</literal>.
</para>
<para>
- You can read more about this in
- <xref linkend="dumping-test-artifacts" />.
+ You can read more about this feature in <xref linkend="dumping-test-artifacts" />.
</para>
</section>
+<!--
+vim: ts=3:sw=3:tw=80:set expandtab
+-->
</chapter>
Modified: tck/trunk/doc/reference/en-US/installation.xml
===================================================================
--- tck/trunk/doc/reference/en-US/installation.xml 2009-07-29 03:14:19 UTC (rev 3341)
+++ tck/trunk/doc/reference/en-US/installation.xml 2009-07-29 04:40:05 UTC (rev 3342)
@@ -58,7 +58,7 @@
</para>
</section>
- <section>
+ <section id="tck-environment">
<title>The TCK Environment</title>
<para>
@@ -259,4 +259,7 @@
project.
</para>
</section>
+<!--
+vim: ts=3:sw=3:tw=80:set expandtab
+-->
</chapter>
Modified: tck/trunk/doc/reference/en-US/introduction.xml
===================================================================
--- tck/trunk/doc/reference/en-US/introduction.xml 2009-07-29 03:14:19 UTC (rev 3341)
+++ tck/trunk/doc/reference/en-US/introduction.xml 2009-07-29 04:40:05 UTC (rev 3342)
@@ -296,4 +296,7 @@
</para>
</section>
</section>
+<!--
+vim: ts=3:sw=3:tw=80:set expandtab
+-->
</chapter>
Modified: tck/trunk/doc/reference/en-US/master.xml
===================================================================
--- tck/trunk/doc/reference/en-US/master.xml 2009-07-29 03:14:19 UTC (rev 3341)
+++ tck/trunk/doc/reference/en-US/master.xml 2009-07-29 04:40:05 UTC (rev 3342)
@@ -6,4 +6,7 @@
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="part-background.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="part-execution.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="part-test-harness.xml" />
+<!--
+vim: ts=3:sw=3:tw=80:set expandtab
+-->
</book>
Modified: tck/trunk/doc/reference/en-US/part-background.xml
===================================================================
--- tck/trunk/doc/reference/en-US/part-background.xml 2009-07-29 03:14:19 UTC (rev 3341)
+++ tck/trunk/doc/reference/en-US/part-background.xml 2009-07-29 04:40:05 UTC (rev 3342)
@@ -24,4 +24,7 @@
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="installation.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="configuration.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="reporting.xml" />
+<!--
+vim: ts=3:sw=3:tw=80:set expandtab
+-->
</part>
Modified: tck/trunk/doc/reference/en-US/part-execution.xml
===================================================================
--- tck/trunk/doc/reference/en-US/part-execution.xml 2009-07-29 03:14:19 UTC (rev 3341)
+++ tck/trunk/doc/reference/en-US/part-execution.xml 2009-07-29 04:40:05 UTC (rev 3342)
@@ -5,14 +5,17 @@
<partintro>
<para>
In this part you learn how to execute the CDI TCK on the CDI
- reference implementation (Web Beans). First, you are walked through the
- steps necessary to execute the test suite on the Web Beans. Then you
- discover how to modify the TCK runner to execute the test suite on your
- own implementation. Finally, you learn how to debug tests from the test
- suite in Eclipse.
+ reference implementation (Web Beans). First, you are walked through
+ the steps necessary to execute the test suite on Web Beans. Then you
+ discover how to modify the TCK runner to execute the test suite on
+ your own implementation. Finally, you learn how to debug tests from
+ the test suite in Eclipse.
</para>
</partintro>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="executing.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="eclipse-running.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="eclipse-debugging.xml" />
+<!--
+vim: ts=3:sw=3:tw=80:set expandtab
+-->
</part>
Modified: tck/trunk/doc/reference/en-US/part-test-harness.xml
===================================================================
--- tck/trunk/doc/reference/en-US/part-test-harness.xml 2009-07-29 03:14:19 UTC (rev 3341)
+++ tck/trunk/doc/reference/en-US/part-test-harness.xml 2009-07-29 04:40:05 UTC (rev 3342)
@@ -12,4 +12,7 @@
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="harness/introduction.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="harness/configuration.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="harness/executing.xml" />
+<!--
+vim: ts=3:sw=3:tw=80:set expandtab
+-->
</part>
Modified: tck/trunk/doc/reference/en-US/reporting.xml
===================================================================
--- tck/trunk/doc/reference/en-US/reporting.xml 2009-07-29 03:14:19 UTC (rev 3341)
+++ tck/trunk/doc/reference/en-US/reporting.xml 2009-07-29 04:40:05 UTC (rev 3342)
@@ -3,4 +3,7 @@
<chapter id="reporting">
<title>Reporting</title>
<para>TODO</para>
+<!--
+vim: ts=3:sw=3:tw=80:set expandtab
+-->
</chapter>
14 years, 9 months
[webbeans-commits] Webbeans SVN: r3341 - tck/trunk/impl/src/main/resources.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-07-28 23:14:19 -0400 (Tue, 28 Jul 2009)
New Revision: 3341
Modified:
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Added sample assertion group
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-29 01:04:40 UTC (rev 3340)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-29 03:14:19 UTC (rev 3341)
@@ -3161,22 +3161,25 @@
</assertion>
</section>
- <section id="6.7.5" title="The Conversation interface">
- <assertion id="iaa">
- <text>The container provides a built-in bean with bean type |Conversation|~, scope |@RequestScoped|, and binding |@Current|, named |javax.enterprise.context.conversation|~</text>
- </assertion>
+ <section id="6.7.5" title="The Conversation interface">
+ <group>
+ <text>The container provides a built-in bean with bean type |Conversation|, scope |@RequestScoped|, and binding |@Current|, named |javax.enterprise.context.conversation|.</text>
+ <assertion id="iaa">
+ <text>Test the bean type is correct.</text>
+ </assertion>
- <assertion id="ib">
- <text>The container provides a built-in bean with ~bean type |Conversation|~, scope |@RequestScoped|~, and binding |@Current|, named |javax.enterprise.context.conversation|~</text>
- </assertion>
+ <assertion id="ib">
+ <text>Test the scope is correct.</text>
+ </assertion>
- <assertion id="id">
- <text>The container provides a built-in bean with bean type ~|Conversation|, scope |@RequestScoped|, and~ binding |@Current|~, named |javax.enterprise.context.conversation|~</text>
- </assertion>
+ <assertion id="id">
+ <text>Test the binding type is correct.</text>
+ </assertion>
- <assertion id="ie">
- <text>The container provides a built-in bean with bean type ~|Conversation|, scope |@RequestScoped|, and binding |@Current|,~ named |javax.enterprise.context.conversation|</text>
- </assertion>
+ <assertion id="ie">
+ <text>Test the bean name is correct.</text>
+ </assertion>
+ </group>
<assertion id="j">
<text>|begin()| marks the current transient conversation long-running. A conversation identifier may, optionally, be specified. If no conversation identifier is specified, an identifier is generated by the container.</text>
14 years, 9 months
[webbeans-commits] Webbeans SVN: r3340 - tck/trunk/impl/src/main/resources/META-INF.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-07-28 21:04:40 -0400 (Tue, 28 Jul 2009)
New Revision: 3340
Modified:
tck/trunk/impl/src/main/resources/META-INF/test-unit.properties
Log:
added rewrite test group to report summary
Modified: tck/trunk/impl/src/main/resources/META-INF/test-unit.properties
===================================================================
--- tck/trunk/impl/src/main/resources/META-INF/test-unit.properties 2009-07-29 00:25:32 UTC (rev 3339)
+++ tck/trunk/impl/src/main/resources/META-INF/test-unit.properties 2009-07-29 01:04:40 UTC (rev 3340)
@@ -14,4 +14,4 @@
unimplemented_test_groups=stub,broken
# A comma-separated list of TestNG test groups that are summarised at the end of the report
-summary_test_groups=ri-broken,review
+summary_test_groups=ri-broken,review,rewrite
14 years, 9 months