Update of /var/cvs/tests/bridge/org/mmbase/bridge
In directory james.mmbase.org:/tmp/cvs-serv4685
Modified Files:
TransactionTest.java
Log Message:
more tests
See also: http://cvs.mmbase.org/viewcvs/tests/bridge/org/mmbase/bridge
Index: TransactionTest.java
===================================================================
RCS file: /var/cvs/tests/bridge/org/mmbase/bridge/TransactionTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- TransactionTest.java 7 Jul 2008 13:18:37 -0000 1.5
+++ TransactionTest.java 7 Jul 2008 15:03:49 -0000 1.6
@@ -16,7 +16,7 @@
* Test class <code>Transaction</code> from the bridge package.
*
* @author Michiel Meeuwissen
- * @version $Id: TransactionTest.java,v 1.5 2008/07/07 13:18:37 michiel Exp $
+ * @version $Id: TransactionTest.java,v 1.6 2008/07/07 15:03:49 michiel Exp $
* @since MMBase-1.8.6
*/
public class TransactionTest extends BridgeTest {
@@ -89,6 +89,7 @@
Transaction t = cloud.getTransaction("bar4");
Node node = t.getNode(newNode);
+
node.setStringValue("title", "zzzzz");
node.commit(); // committing inside transaction
@@ -98,6 +99,15 @@
assertEquals("zzzzz", cloud.getNode(newNode).getStringValue("title"));
}
+ public void testReuseTransaction() {
+ Cloud cloud = getCloud();
+ Transaction t = cloud.getTransaction("bar4");
+ Node node = t.getNode(newNode);
+ node.setStringValue("title", "wwwwww");
+ node.commit();
+ t.cancel();
+
+ }
public void testCancelDelete() {
Cloud cloud = getCloud();
@@ -119,4 +129,18 @@
}
+ public void testSetContext() {
+ Cloud cloud = getCloud();
+ Transaction t = cloud.getTransaction("bar7");
+ Node n = t.getNodeManager("news").createNode();
+ n.setContext("default");
+ assertEquals("default", n.getContext());
+ t.commit();
+
+ Node n2 = cloud.getNode(n.getNumber());
+ assertEquals("default", n2.getContext());
+ }
+
+
+
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs