[webbeans-commits] Webbeans SVN: r1186 - tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Thu Jan 22 19:56:44 EST 2009
Author: shane.bryzak at jboss.com
Date: 2009-01-22 19:56:43 -0500 (Thu, 22 Jan 2009)
New Revision: 1186
Removed:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextManagementTest.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java
Log:
Merged ContextTest and ContextManagementTest, implemented testGetContextWithNoRegisteredContextsFails()
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextManagementTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextManagementTest.java 2009-01-23 00:52:16 UTC (rev 1185)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextManagementTest.java 2009-01-23 00:56:43 UTC (rev 1186)
@@ -1,75 +0,0 @@
-package org.jboss.webbeans.tck.unit.context;
-
-import javax.webbeans.ContextNotActiveException;
-
-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;
-
-/**
- *
- * @author Nicklas Karlsson
- *
- */
- at SpecVersion("20081206")
-public class ContextManagementTest extends AbstractTest
-{
- /**
- * For each of the built-in normal scopes, contexts propagate across any Java
- * method call, including invocation of EJB local business methods.
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6")
- public void testBuiltInNormalScopedContextsPropagateAcrossAnyJavaMethodCall()
- {
- 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" })
- @SpecAssertion(section = "9.6")
- 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" })
- @SpecAssertion(section = "9.6")
- public void testBuiltInNormalScopedContextsDoNotPropagateAcrossAsynchronousMethodInvocations()
- {
- assert false;
- }
-
- /**
- * If no active context object exists for the given scope type, getContext()
- * must throw a ContextNotActiveException.
- */
- @Test(groups = { "stub", "contexts" }, expectedExceptions = ContextNotActiveException.class)
- @SpecAssertion(section = "9.7")
- public void testGettingContextNotActiveFails()
- {
- assert false;
- }
-
- /**
- * If more than one active context object exists for the given scope type,
- * getContext() must throw an IllegalStateException.
- */
- @Test(groups = { "stub", "contexts" }, expectedExceptions = ContextNotActiveException.class)
- @SpecAssertion(section = "9.7")
- public void testGettingContextWithTooManyActiveFails()
- {
- assert false;
- }
-
-}
\ No newline at end of file
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-01-23 00:52:16 UTC (rev 1185)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java 2009-01-23 00:56:43 UTC (rev 1186)
@@ -21,6 +21,11 @@
}
+ private @interface Unregistered
+ {
+
+ }
+
private static class DummyContext implements Context
{
@@ -37,10 +42,9 @@
public boolean isActive()
{
return true;
- }
+ }
+ }
- }
-
@Test(expectedExceptions={ContextNotActiveException.class}, groups={"manager"}) @SpecAssertion(section="9.6")
public void testGetContextWithNoActiveContextsFails()
{
@@ -58,11 +62,10 @@
manager.getContext(Dummy.class);
}
- @Test(expectedExceptions={ContextNotActiveException.class}, groups={"stub", "manager"}) @SpecAssertion(section="9.6")
+ @Test(expectedExceptions={ContextNotActiveException.class}, groups={"manager"}) @SpecAssertion(section="9.6")
public void testGetContextWithNoRegisteredContextsFails()
{
- manager.getContext(RequestScoped.class);
- assert false;
+ manager.getContext(Unregistered.class);
}
@Test(groups={"manager"}) @SpecAssertion(section="9.6")
@@ -71,4 +74,39 @@
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.
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6")
+ public void testBuiltInNormalScopedContextsPropagateAcrossAnyJavaMethodCall()
+ {
+ 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" })
+ @SpecAssertion(section = "9.6")
+ 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" })
+ @SpecAssertion(section = "9.6")
+ public void testBuiltInNormalScopedContextsDoNotPropagateAcrossAsynchronousMethodInvocations()
+ {
+ assert false;
+ }
+
}
More information about the weld-commits
mailing list