Update of /var/cvs/tests/bridge/org/mmbase/bridge
In directory james.mmbase.org:/tmp/cvs-serv13836
Modified Files:
NodeTest.java
Log Message:
testSetContext, testSetOwner cannot be done if security e.g. is NoAuthorization
See also: http://cvs.mmbase.org/viewcvs/tests/bridge/org/mmbase/bridge
Index: NodeTest.java
===================================================================
RCS file: /var/cvs/tests/bridge/org/mmbase/bridge/NodeTest.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- NodeTest.java 27 Apr 2006 08:38:26 -0000 1.20
+++ NodeTest.java 13 Jun 2008 10:05:24 -0000 1.21
@@ -305,7 +305,7 @@
public void testSetContext() {
-
+ if
(org.mmbase.module.core.MMBase.getMMBase().getMMBaseCop().getAuthorization()
instanceof org.mmbase.security.implementation.context.ContextAuthorization) {
String context = node.getContext();
String otherContext = getOtherContext(node);
@@ -323,9 +323,13 @@
assertEquals("Context did not change '" + otherContext + "' != '" +
node.getContext() + "'", otherContext, node.getContext());
assertEquals(node.getContext(), node.getValue("owner"));
+ } else {
+ System.err.println("Warning: could not execute 'set context' test,
because security authorization implemention is no instance of
ContextAuthorization");
+ }
}
public void testSetOwner() {
+ if
(org.mmbase.module.core.MMBase.getMMBase().getMMBaseCop().getAuthorization()
instanceof org.mmbase.security.implementation.context.ContextAuthorization) {
String context = node.getContext();
String otherContext = getOtherContext(node);
@@ -344,10 +348,12 @@
assertEquals("Context did not change '" + otherContext + "' != '" +
node.getContext() + "'", otherContext, node.getContext());
assertEquals(node.getContext(), node.getValue("owner"));
+ } else {
+ System.err.println("Warning: could not execute 'set owner' test,
because security authorization implemention is no instance of
ContextAuthorization");
+ }
}
-
public void testFieldGUI() {
try {
node.getStringValue("gui()");
@@ -357,4 +363,5 @@
}
}
+
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs