Update of /var/cvs/tests/bridge/org/mmbase/bridge
In directory james.mmbase.org:/tmp/cvs-serv1866
Modified Files:
Tag: MMBase-1_8
TransactionTest.java
Log Message:
added another test-case
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.1.2.1
retrieving revision 1.1.2.2
diff -u -b -r1.1.2.1 -r1.1.2.2
--- TransactionTest.java 11 Mar 2008 15:51:07 -0000 1.1.2.1
+++ TransactionTest.java 17 Mar 2008 09:29:59 -0000 1.1.2.2
@@ -16,7 +16,7 @@
* Test class <code>Transaction</code> from the bridge package.
*
* @author Michiel Meeuwissen
- * @version $Id: TransactionTest.java,v 1.1.2.1 2008/03/11 15:51:07 michiel
Exp $
+ * @version $Id: TransactionTest.java,v 1.1.2.2 2008/03/17 09:29:59 michiel
Exp $
* @since MMBase-1.8.6
*/
public class TransactionTest extends BridgeTest {
@@ -51,10 +51,28 @@
assertEquals("foo", node.getStringValue("title"));
}
- public void testCommit() {
+
+ public void testCancel2() {
Cloud cloud = getCloud();
+ {
Transaction t = cloud.getTransaction("bar2");
Node node = t.getNode(newNode);
+ node.setStringValue("title", "xxxxx");
+ node.commit();
+ t.cancel();
+ }
+ {
+ Transaction t = cloud.getTransaction("bar2");
+ Node node = t.getNode(newNode);
+ assertEquals("foo", node.getStringValue("title"));
+ t.cancel();
+ }
+ }
+
+ public void testCommit() {
+ Cloud cloud = getCloud();
+ Transaction t = cloud.getTransaction("bar3");
+ Node node = t.getNode(newNode);
node.setStringValue("title", "yyyyy");
node.commit();
t.commit();
@@ -66,7 +84,7 @@
public void testGetValue() {
Cloud cloud = getCloud();
- Transaction t = cloud.getTransaction("bar3");
+ Transaction t = cloud.getTransaction("bar4");
Node node = t.getNode(newNode);
node.setStringValue("title", "zzzzz");
node.commit(); // committing inside transaction
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs