[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/optimistic ...

Manik Surtani msurtani at jboss.com
Sat Dec 30 21:08:41 EST 2006


  User: msurtani
  Date: 06/12/30 21:08:41

  Modified:    tests/functional/org/jboss/cache/optimistic  
                        NodeInterceptorGetChildrenNamesTest.java
                        NodeInterceptorRemoveNodeTest.java
  Log:
  Updates to tests to go along with changes in node methods
  
  Revision  Changes    Path
  1.12      +11 -3     JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorGetChildrenNamesTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeInterceptorGetChildrenNamesTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorGetChildrenNamesTest.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -b -r1.11 -r1.12
  --- NodeInterceptorGetChildrenNamesTest.java	30 Dec 2006 17:49:52 -0000	1.11
  +++ NodeInterceptorGetChildrenNamesTest.java	31 Dec 2006 02:08:41 -0000	1.12
  @@ -194,11 +194,19 @@
         //assert we can see this
         assertEquals(1, cache.getChildrenNames("/one").size());
   
  +      try
  +      {
         for (Iterator it = cache.getChildrenNames("/one").iterator(); it.hasNext();)
         {
            Object temp = it.next();
            it.remove();
         }
  +         fail("Should not be allowed to modify elements in the set returned by getChildrenNames()");
  +      }
  +      catch (UnsupportedOperationException uoe)
  +      {
  +         // the returned set should be unmodifiable and a remove on the iterator should fail.
  +      }
   
         //assert the removal has had no effect
         assertEquals(1, cache.getChildrenNames("/one").size());
  
  
  
  1.15      +1 -1      JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorRemoveNodeTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeInterceptorRemoveNodeTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorRemoveNodeTest.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -b -r1.14 -r1.15
  --- NodeInterceptorRemoveNodeTest.java	30 Dec 2006 17:49:52 -0000	1.14
  +++ NodeInterceptorRemoveNodeTest.java	31 Dec 2006 02:08:41 -0000	1.15
  @@ -141,7 +141,7 @@
         assertNotNull(workspace.getNode(Fqn.fromString("/one")));
         assertEquals(false, workspace.getNode(Fqn.fromString("/one")).isDeleted());
         assertEquals(0, workspace.getNode(Fqn.fromString("/one")).getMergedChildren().size());
  -      assertEquals(null, workspace.getNode(Fqn.fromString("/one")).getChild(Fqn.fromString("/one/two")));
  +      assertEquals(null, workspace.getNode(Fqn.fromString("/one")).getChild(Fqn.fromString("/two")));
         assertTrue(entry.getLocks().isEmpty());
         assertEquals(2, entry.getModifications().size());
         assertTrue(!cache.exists("/one/two"));
  
  
  



More information about the jboss-cvs-commits mailing list