[webbeans-commits] Webbeans SVN: r1160 - in tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context: dependent and 1 other directory.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Thu Jan 22 07:01:33 EST 2009
Author: shane.bryzak at jboss.com
Date: 2009-01-22 07:01:33 -0500 (Thu, 22 Jan 2009)
New Revision: 1160
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/dependent/DependentContextTest.java
Log:
fixed test, added SPI methods for EL eval
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-22 09:42:17 UTC (rev 1159)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java 2009-01-22 12:01:33 UTC (rev 1160)
@@ -41,14 +41,14 @@
}
- @Test(expectedExceptions={ContextNotActiveException.class}, groups={"manager"}) @SpecAssertion(section="8.6")
+ @Test(expectedExceptions={ContextNotActiveException.class}, groups={"manager"}) @SpecAssertion(section="9.6")
public void testGetContextWithNoActiveContextsFails()
{
configuration().getContexts().setInactive(configuration().getContexts().getRequestContext());
manager.getContext(RequestScoped.class);
}
- @Test(expectedExceptions={IllegalArgumentException.class}, groups={"manager"}) @SpecAssertion(section="8.6")
+ @Test(expectedExceptions={IllegalArgumentException.class}, groups={"manager"}) @SpecAssertion(section="9.6")
public void testGetContextWithTooManyActiveContextsFails()
{
Context firstContext = new DummyContext() {};
@@ -58,14 +58,14 @@
manager.getContext(Dummy.class);
}
- @Test(expectedExceptions={ContextNotActiveException.class}, groups={"stub", "manager"}) @SpecAssertion(section="8.6")
+ @Test(expectedExceptions={ContextNotActiveException.class}, groups={"stub", "manager"}) @SpecAssertion(section="9.6")
public void testGetContextWithNoRegisteredContextsFails()
{
manager.getContext(RequestScoped.class);
assert false;
}
- @Test(groups={"manager"}) @SpecAssertion(section="8.6")
+ @Test(groups={"manager"}) @SpecAssertion(section="9.6")
public void testGetContextReturnsActiveContext()
{
manager.getContext(RequestScoped.class);
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-01-22 09:42:17 UTC (rev 1159)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java 2009-01-22 12:01:33 UTC (rev 1160)
@@ -1,5 +1,7 @@
package org.jboss.webbeans.tck.unit.context.dependent;
+import static org.jboss.webbeans.tck.impl.WebBeansTCKImpl.configuration;
+
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Set;
@@ -14,7 +16,7 @@
import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
- at SpecVersion("20081206")
+ at SpecVersion("20090116")
public class DependentContextTest extends AbstractTest
{
/**
@@ -56,8 +58,9 @@
Bean<Fox> foxBean = foxBeans.iterator().next();
manager.addBean(foxBean);
- assert !manager.getInstanceByName("fox").equals(manager.getInstanceByName("fox")); }
-
+ Fox fox1 = configuration().getContainers().evaluateValueExpression("fox", Fox.class);
+ Fox fox2 = configuration().getContainers().evaluateValueExpression("fox", Fox.class);
+ assert !fox1.equals(fox2);
}.run();
}
More information about the weld-commits
mailing list