FYI, the problem here was that we're not running with asserts on inside of Tomcat yet, thus those tests didn't catch the bogus lines below.


 We'll get those turned on shortly...



[EMAIL PROTECTED] wrote:

Author: ekoneil
Date: Mon Jul 19 14:46:28 2004
New Revision: 23070

Modified:
  
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/script/common/BundleMap.java
  
incubator/beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/script/BundleScriptTest.java
Log:
Fixup broken assert in BundleMap and start passing ServletContext from the 
BundleScript test.

BB: self
DRT (junit + server): pass
CR: Daryl



Modified: 
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/script/common/BundleMap.java
==============================================================================
--- 
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/script/common/BundleMap.java
    (original)
+++ 
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/script/common/BundleMap.java
    Mon Jul 19 14:46:28 2004
@@ -274,8 +274,8 @@

        ScriptableBundle(String propertiesName, BundleNode bundle)
        {
-            assert _bundle != null;
-            assert _propertiesName != null;
+            assert bundle != null;
+            assert propertiesName != null;

            _bundle = bundle;
            _propertiesName = propertiesName;

Modified: 
incubator/beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/script/BundleScriptTest.java
==============================================================================
--- 
incubator/beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/script/BundleScriptTest.java
        (original)
+++ 
incubator/beehive/trunk/netui/test/src/junitTests/org/apache/beehive/netui/test/script/BundleScriptTest.java
        Mon Jul 19 14:46:28 2004
@@ -43,7 +43,9 @@
        throws Exception
    {
        BundleContext bc = createBundleContext();
-        BundleMap bundleMap = new 
BundleMap((HttpServletRequest)_fauxPageContext.getRequest(), null, bc);
+        BundleMap bundleMap = new 
BundleMap((HttpServletRequest)_fauxPageContext.getRequest(),
+                                            
_fauxPageContext.getServletContext(),
+                                            bc);
        _fauxPageContext.setAttribute("bundle", bundleMap);

        bc.addBundle("bundle1", 
"org/apache/beehive/netui/test/databinding/testdata/bundle1");
@@ -65,7 +67,9 @@
        bc.addBundle("bundle1", 
"org/apache/beehive/netui/test/databinding/testdata/bundle1", germany);
        bc.addBundle("bundle2", 
"org/apache/beehive/netui/test/databinding/testdata/bundle2");

-        BundleMap bundleMap = new 
BundleMap((HttpServletRequest)_fauxPageContext.getRequest(), null, bc);
+        BundleMap bundleMap = new 
BundleMap((HttpServletRequest)_fauxPageContext.getRequest(),
+                                            
_fauxPageContext.getServletContext(),
+                                            bc);
        _fauxPageContext.setAttribute("bundle", bundleMap);

        String val = (String)evaluateExpression("{bundle.bundle1.localHello}", 
_fauxPageContext);



Reply via email to