[jboss-cvs] JBossCache/tests-50/functional/org/jboss/cache/pojo/rollback ...

Ben Wang bwang at jboss.com
Tue Oct 10 05:59:35 EDT 2006


  User: bwang   
  Date: 06/10/10 05:59:35

  Modified:    tests-50/functional/org/jboss/cache/pojo/rollback 
                        MapTxUndoTest.java
  Log:
  new test
  
  Revision  Changes    Path
  1.4       +15 -0     JBossCache/tests-50/functional/org/jboss/cache/pojo/rollback/MapTxUndoTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: MapTxUndoTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests-50/functional/org/jboss/cache/pojo/rollback/MapTxUndoTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- MapTxUndoTest.java	17 Sep 2006 08:02:49 -0000	1.3
  +++ MapTxUndoTest.java	10 Oct 2006 09:59:35 -0000	1.4
  @@ -176,6 +176,21 @@
          assertEquals(beforeModify, afterRollback);
      }
   
  +   public void testPlainMapRollback() throws Exception
  +   {
  +      // create cached data objects
  +      Map obj1 = new HashMap();
  +      obj1.put("id", "1");
  +      cache_.attach("objs/1", obj1);
  +      obj1 = (Map) cache_.find("objs/1");
  +
  +      tx_mgr.begin();
  +      obj1.put("id", "newId");
  +      tx_mgr.rollback();
  +
  +      assertEquals("1", obj1.get("id"));
  +   }
  +
      public static Test suite() throws Exception
      {
         return new TestSuite(MapTxUndoTest.class);
  
  
  



More information about the jboss-cvs-commits mailing list