[webbeans-commits] Webbeans SVN: r1396 - in tck/trunk/impl/src/main/java/org/jboss/webbeans/tck: integration/context and 6 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Tue Feb 3 10:47:47 EST 2009
Author: dallen6
Date: 2009-02-03 10:47:47 -0500 (Tue, 03 Feb 2009)
New Revision: 1396
Added:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/ContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/dependent/
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/dependent/DependentContextTest.java
Removed:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/SpecVersion.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/passivating/PassivatingContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/implementation/enterprise/EnterpriseBeanLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java
Log:
Moved misplaced integration tests and removed the SpecVersion annotation.
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/SpecVersion.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/SpecVersion.java 2009-02-03 15:22:56 UTC (rev 1395)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/SpecVersion.java 2009-02-03 15:47:47 UTC (rev 1396)
@@ -1,33 +0,0 @@
-/*
- * 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.webbeans.tck.impl;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Target;
-
-/**
- * @author Pete Muir
- *
- */
- at Documented
- at Target(ElementType.TYPE)
-public @interface SpecVersion
-{
- String value();
-}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/ContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/ContextTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/ContextTest.java 2009-02-03 15:47:47 UTC (rev 1396)
@@ -0,0 +1,53 @@
+/*
+ * 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.webbeans.tck.integration.context;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * Spec version: PRD2
+ */
+public class ContextTest
+{
+ /**
+ * The built-in contexts do not propagate across remote method invocations or
+ * to asynchronous processes such as JMS message listeners or EJB timer
+ * service timeouts
+ */
+ @Test(groups = { "stub", "contexts", "integration" })
+ @SpecAssertion(section = "8.5", id = "unknown")
+ public void testBuiltInNormalScopedContextsDoNotPropagateAcrossRemoteMethodInvocations()
+ {
+ assert false;
+ }
+
+ /**
+ * The built-in contexts do not propagate across remote method invocations or
+ * to asynchronous processes such as JMS message listeners or EJB timer
+ * service timeouts
+ */
+ @Test(groups = { "stub", "contexts", "integration" })
+ @SpecAssertion(section = "8.5", id = "unknown")
+ public void testBuiltInNormalScopedContextsDoNotPropagateAcrossAsynchronousMethodInvocations()
+ {
+ assert false;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/ContextTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/dependent/DependentContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/dependent/DependentContextTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/dependent/DependentContextTest.java 2009-02-03 15:47:47 UTC (rev 1396)
@@ -0,0 +1,61 @@
+/*
+ * 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.webbeans.tck.integration.context.dependent;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.testng.annotations.Test;
+
+/**
+ * Spec version: Public Release Draft 2
+ */
+public class DependentContextTest
+{
+ /**
+ * when the container is injecting dependencies of an EJB or servlet or when
+ * a @PostConstruct or @PreDestroy callback is invoked by the EJB container.
+ */
+ @Test(groups = { "contexts", "injection", "stub", "ejb3", "integration" })
+ @SpecAssertion(section = "8.3", id = "unknown")
+ public void testContextIsActiveDuringEJBDependencyInjection()
+ {
+ assert false;
+ }
+
+ /**
+ * destroy all dependent objects of an EJB bean or Servlet when the EJB bean
+ * or Servlet is destroyed,
+ */
+ @Test(groups = { "stub", "contexts", "ejb3", "integration" })
+ @SpecAssertion(section = "8.3.2", id = "unknown")
+ public void testDestroyingEjbDestroysDependents()
+ {
+ assert false;
+ }
+
+ /**
+ * destroy all dependent objects of an EJB bean or Servlet when the EJB bean
+ * or Servlet is destroyed,
+ */
+ @Test(groups = { "stub", "contexts", "servlet", "integration" })
+ @SpecAssertion(section = "8.3.2", id = "unknown")
+ public void testDestroyingServletDestroysDependents()
+ {
+ assert false;
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/dependent/DependentContextTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/passivating/PassivatingContextTest.java 2009-02-03 15:22:56 UTC (rev 1395)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/passivating/PassivatingContextTest.java 2009-02-03 15:47:47 UTC (rev 1396)
@@ -1,14 +1,16 @@
package org.jboss.webbeans.tck.integration.context.passivating;
+import javax.inject.IllegalProductException;
+
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
import org.testng.annotations.Test;
/**
*
- * @author Nicklas Karlsson
+ * @author Nicklas Karlsson
*
- * Spec version: PRD2
+ * Spec version: PRD2
*/
public class PassivatingContextTest extends AbstractTest
{
@@ -24,7 +26,6 @@
deployBeans(Turku.class);
}
-
/**
* The Web Bean manager must guarantee that JMS endpoint proxy objects are
* serializable.
@@ -35,4 +36,24 @@
{
assert false;
}
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ *
+ * @throws NoSuchMethodException
+ * @throws SecurityException
+ */
+ @Test(groups = { "contexts", "passivation", "integration", "broken" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "8.4", id = "unknown")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails() throws SecurityException, NoSuchMethodException
+ {
+ deployBeans(CityProducer2.class, Maarianhamina_Broken.class);
+ manager.getInstanceByType(Maarianhamina_Broken.class);
+ }
+
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/implementation/enterprise/EnterpriseBeanLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/implementation/enterprise/EnterpriseBeanLifecycleTest.java 2009-02-03 15:22:56 UTC (rev 1395)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/implementation/enterprise/EnterpriseBeanLifecycleTest.java 2009-02-03 15:47:47 UTC (rev 1396)
@@ -2,7 +2,6 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
/**
@@ -16,8 +15,9 @@
*
* @author Nicklas Karlsson
*
+ * Spec version: Public Release Draft 2
+ *
*/
- at SpecVersion("PRD2")
public class EnterpriseBeanLifecycleTest extends AbstractTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java 2009-02-03 15:22:56 UTC (rev 1395)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java 2009-02-03 15:47:47 UTC (rev 1396)
@@ -20,17 +20,17 @@
*/
public class ContextTest extends AbstractTest
{
-
+
private @interface Dummy
{
-
+
}
-
+
private @interface Unregistered
- {
-
+ {
+
}
-
+
private static class DummyContext implements Context
{
@@ -38,7 +38,7 @@
{
throw new UnsupportedOperationException();
}
-
+
public <T> T get(Contextual<T> contextual)
{
return get(contextual, null);
@@ -52,42 +52,46 @@
public boolean isActive()
{
return true;
- }
+ }
}
-
- @Test(expectedExceptions={ContextNotActiveException.class}, groups={"manager"})
- @SpecAssertion(section="8.5", id = "unknown")
+
+ @Test(expectedExceptions = { ContextNotActiveException.class }, groups = { "manager" })
+ @SpecAssertion(section = "8.5", id = "unknown")
public void testGetContextWithNoActiveContextsFails()
{
configuration().getContexts().setInactive(configuration().getContexts().getRequestContext());
manager.getContext(RequestScoped.class);
}
- @Test(expectedExceptions={IllegalArgumentException.class}, groups={"manager"})
- @SpecAssertion(section="8.5", id = "unknown")
+ @Test(expectedExceptions = { IllegalArgumentException.class }, groups = { "manager" })
+ @SpecAssertion(section = "8.5", id = "unknown")
public void testGetContextWithTooManyActiveContextsFails()
{
- Context firstContext = new DummyContext() {};
- Context secondContext = new DummyContext() {};
+ Context firstContext = new DummyContext()
+ {
+ };
+ Context secondContext = new DummyContext()
+ {
+ };
manager.addContext(firstContext);
manager.addContext(secondContext);
manager.getContext(Dummy.class);
}
- @Test(expectedExceptions={ContextNotActiveException.class}, groups={"manager"})
- @SpecAssertion(section="8.5", id = "unknown")
+ @Test(expectedExceptions = { ContextNotActiveException.class }, groups = { "manager" })
+ @SpecAssertion(section = "8.5", id = "unknown")
public void testGetContextWithNoRegisteredContextsFails()
{
manager.getContext(Unregistered.class);
}
- @Test(groups={"manager"})
- @SpecAssertion(section="8.5", id = "unknown")
+ @Test(groups = { "manager" })
+ @SpecAssertion(section = "8.5", id = "unknown")
public void testGetContextReturnsActiveContext()
{
manager.getContext(RequestScoped.class);
}
-
+
/**
* For each of the built-in normal scopes, contexts propagate across any Java
* method call, including invocation of EJB local business methods.
@@ -99,28 +103,4 @@
assert false;
}
- /**
- * The built-in contexts do not propagate across remote method invocations or
- * to asynchronous processes such as JMS message listeners or EJB timer
- * service timeouts
- */
- @Test(groups = { "stub", "contexts", "integration" })
- @SpecAssertion(section = "8.5", id = "unknown")
- public void testBuiltInNormalScopedContextsDoNotPropagateAcrossRemoteMethodInvocations()
- {
- assert false;
- }
-
- /**
- * The built-in contexts do not propagate across remote method invocations or
- * to asynchronous processes such as JMS message listeners or EJB timer
- * service timeouts
- */
- @Test(groups = { "stub", "contexts", "integration" })
- @SpecAssertion(section = "8.5", id = "unknown")
- public void testBuiltInNormalScopedContextsDoNotPropagateAcrossAsynchronousMethodInvocations()
- {
- assert false;
- }
-
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java 2009-02-03 15:22:56 UTC (rev 1395)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java 2009-02-03 15:47:47 UTC (rev 1396)
@@ -11,10 +11,11 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
- at SpecVersion("PRD2")
+/**
+ * Spec version: Public Release Draft 2
+ */
public class DependentContextTest extends AbstractTest
{
/**
@@ -308,17 +309,6 @@
* when the container is injecting dependencies of an EJB or servlet or when
* a @PostConstruct or @PreDestroy callback is invoked by the EJB container.
*/
- @Test(groups = { "contexts", "injection", "stub", "ejb3", "integration" })
- @SpecAssertion(section = "8.3", id = "unknown")
- public void testContextIsActiveDuringEJBDependencyInjection()
- {
- assert false;
- }
-
- /**
- * when the container is injecting dependencies of an EJB or servlet or when
- * a @PostConstruct or @PreDestroy callback is invoked by the EJB container.
- */
@Test(groups = { "contexts", "injection", "stub", "servlet" })
@SpecAssertion(section = "8.3", id = "unknown")
public void testContextIsActiveDuringServletDependencyInjection()
@@ -394,28 +384,6 @@
}
/**
- * destroy all dependent objects of an EJB bean or Servlet when the EJB bean
- * or Servlet is destroyed,
- */
- @Test(groups = { "stub", "contexts", "ejb3", "integration" })
- @SpecAssertion(section = "8.3.2", id = "unknown")
- public void testDestroyingEjbDestroysDependents()
- {
- assert false;
- }
-
- /**
- * destroy all dependent objects of an EJB bean or Servlet when the EJB bean
- * or Servlet is destroyed,
- */
- @Test(groups = { "stub", "contexts", "servlet", "integration" })
- @SpecAssertion(section = "8.3.2", id = "unknown")
- public void testDestroyingServletDestroysDependents()
- {
- assert false;
- }
-
- /**
* destroy all @Dependent scoped contextual instances created during an EL
* expression evaluation when the evaluation completes, and
*/
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java 2009-02-03 15:22:56 UTC (rev 1395)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java 2009-02-03 15:47:47 UTC (rev 1396)
@@ -282,26 +282,7 @@
* parameter of a Web Bean which declares a passivating scope type, or into a
* parameter of a producer method which declares a passivating scope type, an
* IllegalProductException is thrown by the Web Bean manager.
- *
- * @throws NoSuchMethodException
- * @throws SecurityException
*/
- @Test(groups = { "contexts", "passivation", "integration", "broken" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "8.4", id = "unknown")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails() throws SecurityException, NoSuchMethodException
- {
- deployBeans(CityProducer2.class, Maarianhamina_Broken.class);
- manager.getInstanceByType(Maarianhamina_Broken.class);
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
@Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
@SpecAssertion(section = "8.4", id = "unknown")
public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
More information about the weld-commits
mailing list