Update of /var/cvs/tests/bridge/org/mmbase/bridge
In directory james.mmbase.org:/tmp/cvs-serv27314

Modified Files:
        FunctionsTest.java 
Log Message:
added some test-cases about functions on cluster nodes


See also: http://cvs.mmbase.org/viewcvs/tests/bridge/org/mmbase/bridge


Index: FunctionsTest.java
===================================================================
RCS file: /var/cvs/tests/bridge/org/mmbase/bridge/FunctionsTest.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- FunctionsTest.java  22 Sep 2008 17:15:20 -0000      1.15
+++ FunctionsTest.java  18 Nov 2008 23:33:31 -0000      1.16
@@ -20,7 +20,7 @@
  *
  * @author Simon Groenewolt ([EMAIL PROTECTED])
  * @author Michiel Meeuwissen
- * @since $Id: FunctionsTest.java,v 1.15 2008/09/22 17:15:20 michiel Exp $
+ * @since $Id: FunctionsTest.java,v 1.16 2008/11/18 23:33:31 michiel Exp $
  * @since MMBase-1.8
  */
 public class FunctionsTest extends BridgeTest {
@@ -215,6 +215,29 @@
     }
 
 
+    public void testFunctionOnClusterNode() {
+        Cloud cloud = getCloud();
+        NodeList nl = cloud.getList("", "object", "",
+                                    "", "", "",
+                                    "", false);
+        Node n = nl.get(0);
+        assertTrue(n.getNumber() < 0);
+
+        // info implemented in MMObjectBuilder  itself, so even virtual nodes 
must  have it, and give something non empty
+        assertTrue(!"".equals(n.getFunctionValue("info", null).toString()));
+
+        // TODO: FAILS!!!
+        //assertTrue(!"".equals(n.getStringValue("info()")));
+
+        // could also test gui of virtual nodes themselves, they seem to give 
empty now.
+
+        // should be possible to call functions on elements too.
+        assertTrue(!"".equals(n.getNodeValue("object").getFunctionValue("gui", 
null).toString()));
+
+        // TODO: FAILS:
+        //assertTrue(!"".equals(n.getStringValue("object.gui()")));
+    }
+
     public void testNonExistingFunctionOnClusterNode() { //MMB-1208
         Cloud cloud = getCloud();
         NodeList nl = cloud.getList("", "object", "",
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to