[seam-commits] Seam SVN: r10256 - trunk/src/test/unit/org/jboss/seam/test/unit.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Mar 31 17:00:45 EDT 2009


Author: dan.j.allen
Date: 2009-03-31 17:00:45 -0400 (Tue, 31 Mar 2009)
New Revision: 10256

Modified:
   trunk/src/test/unit/org/jboss/seam/test/unit/ContextTest.java
Log:
JBSEAM-3077


Modified: trunk/src/test/unit/org/jboss/seam/test/unit/ContextTest.java
===================================================================
--- trunk/src/test/unit/org/jboss/seam/test/unit/ContextTest.java	2009-03-31 19:55:45 UTC (rev 10255)
+++ trunk/src/test/unit/org/jboss/seam/test/unit/ContextTest.java	2009-03-31 21:00:45 UTC (rev 10256)
@@ -8,6 +8,7 @@
 import javax.servlet.http.HttpServletRequest;
 
 import org.jboss.seam.Component;
+import org.jboss.seam.Namespace;
 import org.jboss.seam.Seam;
 import org.jboss.seam.contexts.ApplicationContext;
 import org.jboss.seam.contexts.Context;
@@ -31,6 +32,7 @@
 import org.jboss.seam.web.Parameters;
 import org.jboss.seam.web.ServletContexts;
 import org.jboss.seam.web.Session;
+import org.testng.Assert;
 import org.testng.annotations.Test;
 
 public class ContextTest {
@@ -159,6 +161,14 @@
         assert seamVariableResolver.getValue(elContext, null, "bar") == bar;
         assert seamVariableResolver.getValue(elContext, null, "foo") == foo;
 
+        // JBSEAM-3077
+        assert EL.EL_RESOLVER.getValue(elContext, new Namespace("org.jboss.seam.core."), "conversationEntries") instanceof ConversationEntries;
+        try {
+            assert EL.EL_RESOLVER.getValue(elContext, new Namespace("org.jboss.seam."), "caughtException") == null;
+        } catch (Exception e) {
+            Assert.fail("An exception should not be thrown when a qualified name resolves to null", e);
+        }
+
         /*
          * assert jbpmVariableResolver.resolveVariable("zzz").equals("bar");
          * assert jbpmVariableResolver.resolveVariable("xxx").equals("yyy");
@@ -174,7 +184,7 @@
         assert !Contexts.isConversationContextActive();
         assert !Contexts.isApplicationContextActive();
         assert ((MockHttpSession) externalContext.getSession(false))
-                .getAttributes().size() == 2;
+                .getAttributes().size() == 3; // foo, zzz, org.jboss.seam.core.conversationEntries
         assert ((MockServletContext) externalContext.getContext())
                 .getAttributes().size() == 10;
 




More information about the seam-commits mailing list