[webbeans-commits] Webbeans SVN: r1649 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/unit/definition/deployment/nonBuiltInUsesStandard and 3 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Sun Feb 22 16:32:15 EST 2009
Author: pete.muir at jboss.org
Date: 2009-02-22 16:32:14 -0500 (Sun, 22 Feb 2009)
New Revision: 1649
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/Tarantula.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/nonBuiltInUsesStandard/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/nonBuiltInUsesStandard/Gazelle_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/nonBuiltInUsesStandard/NonBuiltInUsesStandardTest.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/unit/definition/deployment/beans.xml
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/Gazelle_Broken.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/DeploymentTypeDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/byname/InstantiationByNameTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injection/BeanWithFinalBoundField_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injection/BeanWithStaticBoundField_Broken.java
Log:
@Artifactify
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/DeploymentTypeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/DeploymentTypeDefinitionTest.java 2009-02-22 21:11:01 UTC (rev 1648)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/DeploymentTypeDefinitionTest.java 2009-02-22 21:32:14 UTC (rev 1649)
@@ -1,9 +1,5 @@
package org.jboss.jsr299.tck.unit.definition.deployment;
-import java.lang.annotation.Annotation;
-import java.util.List;
-
-import javax.inject.DefinitionException;
import javax.inject.DeploymentException;
import javax.inject.Production;
import javax.inject.UnsatisfiedDependencyException;
@@ -12,6 +8,8 @@
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+import org.jboss.jsr299.tck.impl.packaging.Artifact;
+import org.jboss.jsr299.tck.impl.packaging.jsr299.BeansXml;
import org.testng.annotations.Test;
/**
@@ -19,33 +17,16 @@
* Spec version: Public Release Draft 2
*
*/
-//@Artifact
+ at Artifact
+ at BeansXml("beans.xml")
public class DeploymentTypeDefinitionTest extends AbstractDeclarativeTest
{
- @Override
- protected List<Class<? extends Annotation>> getEnabledDeploymentTypes()
- {
- List<Class<? extends Annotation>> deploymentTypes = super.getStandardDeploymentTypes();
- deploymentTypes.add(AnotherDeploymentType.class);
- deploymentTypes.add(HornedAnimalDeploymentType.class);
- deploymentTypes.add(NotInheritedDeploymentType.class);
- deploymentTypes.add(InheritedDeploymentType.class);
- return deploymentTypes;
- }
-
- @Test(groups = { "deploymentType" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "2.5.1", id = "b")
- public void testNonBuiltInComponentUsesStandard()
- {
- deployBeans(Gazelle_Broken.class);
- }
-
/**
*
* TODO This text is not really a testable assertion
*/
- @Test(groups = { "underInvestigation", "annotationDefinition", "deploymentType" })
+ @Test(groups = { "stub", "annotationDefinition", "deploymentType" })
@SpecAssertion(section = "2.5.2", id = "a")
public void testDeploymentTypeHasCorrectTarget()
{
@@ -56,7 +37,7 @@
*
* TODO This text is not really a testable assertion
*/
- @Test(groups = { "underInvestigation", "annotationDefinition", "deploymentType" })
+ @Test(groups = { "stub", "annotationDefinition", "deploymentType" })
@SpecAssertion(section = "2.5.2", id = "c")
public void testDeploymentTypeDeclaresDeploymentTypeAnnotation()
{
@@ -67,7 +48,7 @@
@SpecAssertion(section = "2.5.3", id = "c")
public void testDeploymentTypeInhertitedFromDeclaringBean() throws Exception
{
- deployBeans(SpiderProducer.class);
+ assert getCurrentManager().resolveByType(BlackWidow.class).size() == 1;
Bean<BlackWidow> blackWidowSpiderModel = getCurrentManager().resolveByType(BlackWidow.class).iterator().next();
assert blackWidowSpiderModel.getDeploymentType().equals(AnotherDeploymentType.class);
}
@@ -81,20 +62,6 @@
@SpecAssertion(section = "2.5.4", id = "a")
public void testXmlDeploymentTypeElement()
{
- // Map<Class<? extends Annotation>, Annotation>
- // xmlDefinedDeploymentTypeAnnotations = new HashMap<Class<? extends
- // Annotation>, Annotation>();
- // xmlDefinedDeploymentTypeAnnotations.put(AnotherDeploymentType.class,
- // new AnotherDeploymentTypeAnnotationLiteral());
- // AnnotatedClass<BeanWithTooManyDeploymentTypes>
- // xmlDefinedDeploymentTypeAnnotatedItem = new
- // SimpleAnnotatedClass<BeanWithTooManyDeploymentTypes>(BeanWithTooManyDeploymentTypes.class,
- // xmlDefinedDeploymentTypeAnnotations);
-
- // SimpleBean<BeanWithTooManyDeploymentTypes> model =
- // createSimpleBean(BeanWithTooManyDeploymentTypes.class,
- // xmlDefinedDeploymentTypeAnnotatedItem, manager);
- // assert model.getDeploymentType().equals(AnotherDeploymentType.class);
assert false;
}
@@ -102,8 +69,8 @@
@SpecAssertion(section = "2.5.5", id = "a")
public void testDefaultDeploymentType()
{
- deployBeans(BlackWidow.class);
- Bean<BlackWidow> bean = getCurrentManager().resolveByType(BlackWidow.class).iterator().next();
+ assert getCurrentManager().resolveByType(Tarantula.class).size() == 1;
+ Bean<Tarantula> bean = getCurrentManager().resolveByType(Tarantula.class).iterator().next();
assert bean.getDeploymentType().equals(Production.class);
}
@@ -111,7 +78,7 @@
@SpecAssertion(section = "2.5.5", id = "b")
public void testHighestPrecedenceDeploymentTypeFromStereotype()
{
- deployBeans(Rhinoceros.class);
+ assert getCurrentManager().resolveByType(Rhinoceros.class).size() == 1;
Bean<?> bean = getCurrentManager().resolveByType(Rhinoceros.class).iterator().next();
assert bean.getDeploymentType().equals(HornedAnimalDeploymentType.class);
}
@@ -120,7 +87,6 @@
@SpecAssertion(section = "2.5.6", id = "a")
public void testBeanWithDisabledDeploymentTypeNotInstantiated()
{
- deployBeans(RedSnapper.class);
getCurrentManager().getInstanceByType(RedSnapper.class);
}
@@ -128,20 +94,16 @@
@SpecAssertion(section = "2.5.4", id = "b")
public void testMultipleDeployElementsCannotBeDefined()
{
-
+ assert false;
}
- /**
- * If a bean explicitly declares a deployment type, any default deployment
- * type declared by stereotypes are ignored.
- */
@Test(groups = { "deploymentType" })
@SpecAssertions( { @SpecAssertion(section = "2.5.5", id = "c"),
@SpecAssertion(section = "2.7.2", id = "da"),
@SpecAssertion(section = "4.1", id = "d") })
public void testWebBeanDeploymentTypeOverridesStereotype()
{
- deployBeans(Reindeer.class);
+ assert getCurrentManager().resolveByType(Reindeer.class).size() == 1;
Bean<Reindeer> bean = getCurrentManager().resolveByType(Reindeer.class).iterator().next();
assert bean.getDeploymentType().equals(Production.class);
}
@@ -150,7 +112,7 @@
@SpecAssertion(section = "4.1", id = "c")
public void testDeploymentTypeDeclaredInheritedIsInherited() throws Exception
{
- deployBeans(BorderCollie.class);
+ assert getCurrentManager().resolveByType(BorderCollie.class).size() == 1;
assert getCurrentManager().resolveByType(BorderCollie.class).iterator().next().getDeploymentType().equals(AnotherDeploymentType.class);
}
@@ -158,7 +120,7 @@
@SpecAssertion(section = "4.1", id = "c")
public void testDeploymentTypeNotDeclaredInheritedIsNotInherited()
{
- deployBeans(ShetlandPony.class);
+ assert getCurrentManager().resolveByType(ShetlandPony.class).size() == 1;
assert getCurrentManager().resolveByType(ShetlandPony.class).iterator().next().getDeploymentType().equals(Production.class);
}
@@ -166,7 +128,7 @@
@SpecAssertion(section = "4.1", id = "c")
public void testDeploymentTypeDeclaredInheritedIsBlockedByIntermediateDeploymentTypeNotMarkedInherited()
{
- deployBeans(GoldenRetriever.class);
+ assert getCurrentManager().resolveByType(GoldenRetriever.class).size() == 1;
assert getCurrentManager().resolveByType(GoldenRetriever.class).iterator().next().getDeploymentType().equals(Production.class);
}
@@ -174,7 +136,7 @@
@SpecAssertion(section = "4.1", id = "c")
public void testDeploymentTypeDeclaredInheritedIsBlockedByIntermediateDeploymentTypeMarkedInherited()
{
- deployBeans(GoldenLabrador.class);
+ assert getCurrentManager().resolveByType(GoldenLabrador.class).size() == 1;
assert getCurrentManager().resolveByType(GoldenLabrador.class).iterator().next().getDeploymentType().equals(InheritedDeploymentType.class);
}
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/Gazelle_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/Gazelle_Broken.java 2009-02-22 21:11:01 UTC (rev 1648)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/Gazelle_Broken.java 2009-02-22 21:32:14 UTC (rev 1649)
@@ -1,9 +0,0 @@
-package org.jboss.jsr299.tck.unit.definition.deployment;
-
-import javax.inject.Standard;
-
- at Standard
-class Gazelle_Broken
-{
-
-}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/Tarantula.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/Tarantula.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/Tarantula.java 2009-02-22 21:32:14 UTC (rev 1649)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.unit.definition.deployment;
+
+class Tarantula
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/Tarantula.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/nonBuiltInUsesStandard/Gazelle_Broken.java (from rev 1635, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/Gazelle_Broken.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/nonBuiltInUsesStandard/Gazelle_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/nonBuiltInUsesStandard/Gazelle_Broken.java 2009-02-22 21:32:14 UTC (rev 1649)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.unit.definition.deployment.nonBuiltInUsesStandard;
+
+import javax.inject.Standard;
+
+ at Standard
+class Gazelle_Broken
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/nonBuiltInUsesStandard/NonBuiltInUsesStandardTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/nonBuiltInUsesStandard/NonBuiltInUsesStandardTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/nonBuiltInUsesStandard/NonBuiltInUsesStandardTest.java 2009-02-22 21:32:14 UTC (rev 1649)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.unit.definition.deployment.nonBuiltInUsesStandard;
+
+import javax.inject.DefinitionException;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+import org.jboss.jsr299.tck.impl.packaging.Artifact;
+import org.jboss.jsr299.tck.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+ at Artifact
+ at ExpectedDeploymentException(DefinitionException.class)
+public class NonBuiltInUsesStandardTest extends AbstractDeclarativeTest
+{
+
+ @Test(groups = { "deploymentType" })
+ @SpecAssertion(section = "2.5.1", id = "b")
+ public void testNonBuiltInComponentUsesStandard()
+ {
+ assert false;
+ }
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/deployment/nonBuiltInUsesStandard/NonBuiltInUsesStandardTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/byname/InstantiationByNameTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/byname/InstantiationByNameTest.java 2009-02-22 21:11:01 UTC (rev 1648)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/byname/InstantiationByNameTest.java 2009-02-22 21:32:14 UTC (rev 1649)
@@ -3,6 +3,7 @@
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+import org.jboss.jsr299.tck.impl.packaging.Artifact;
import org.testng.annotations.Test;
/**
@@ -10,6 +11,7 @@
* Spec version: PRD2
*
*/
+ at Artifact
public class InstantiationByNameTest extends AbstractDeclarativeTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injection/BeanWithFinalBoundField_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injection/BeanWithFinalBoundField_Broken.java 2009-02-22 21:11:01 UTC (rev 1648)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injection/BeanWithFinalBoundField_Broken.java 2009-02-22 21:32:14 UTC (rev 1649)
@@ -1,10 +1,9 @@
package org.jboss.jsr299.tck.unit.lookup.injection;
-import javax.inject.Current;
class BeanWithFinalBoundField_Broken
{
- @Current public final Tuna tuna = null;
+ /*@Current*/ public final Tuna tuna = null;
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injection/BeanWithStaticBoundField_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injection/BeanWithStaticBoundField_Broken.java 2009-02-22 21:11:01 UTC (rev 1648)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/lookup/injection/BeanWithStaticBoundField_Broken.java 2009-02-22 21:32:14 UTC (rev 1649)
@@ -1,10 +1,9 @@
package org.jboss.jsr299.tck.unit.lookup.injection;
-import javax.inject.Current;
class BeanWithStaticBoundField_Broken
{
- @Current public static Tuna tuna;
+ /*@Current*/ public static Tuna tuna;
}
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/unit/definition/deployment/beans.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/unit/definition/deployment/beans.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/unit/definition/deployment/beans.xml 2009-02-22 21:32:14 UTC (rev 1649)
@@ -0,0 +1,11 @@
+<Beans xmlns="urn:java:ee"
+ xmlns:test="urn:java:org.jboss.jsr299.tck.unit.definition.deployment">
+ <Deploy>
+ <Standard />
+ <Production />
+ <test:AnotherDeploymentType />
+ <test:HornedAnimalDeploymentType />
+ <test:NotInheritedDeploymentType />
+ <test:InheritedDeploymentType />
+ </Deploy>
+</Beans>
Property changes on: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/unit/definition/deployment/beans.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
More information about the weld-commits
mailing list