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

Elias Ross genman at noderunner.net
Fri Dec 8 14:11:36 EST 2006


  User: genman  
  Date: 06/12/08 14:11:36

  Added:       tests/functional/org/jboss/cache  NodeImplTest.java
  Log:
  JBCACHE-888 Clean up node interfaces a little more
  
  Revision  Changes    Path
  1.1      date: 2006/12/08 19:11:36;  author: genman;  state: Exp;JBossCache/tests/functional/org/jboss/cache/NodeImplTest.java
  
  Index: NodeImplTest.java
  ===================================================================
  package org.jboss.cache;
  
  import java.util.Collections;
  import java.util.Map;
  import java.util.SortedMap;
  import java.util.SortedSet;
  
  import junit.framework.TestCase;
  
  public class NodeImplTest extends TestCase
  {
     NodeImpl node = new NodeImpl(Fqn.ROOT);
     
     public void testBasic()
     {
        assertEquals(Collections.emptyMap(), node.getData());
        assertEquals(Collections.emptySet(), node.getChildren());
     }
     /*
     public void testOrder()
     {  
        node.orderData();
        // bypass invocation chain
        Map m = node.getNodeSPI().getRawData();
        m.put("a", "x");
        m.put("b", "x");
        m.put("c", "x");
        
        SortedMap sm = (SortedMap) node.getData();
        assertEquals(null, sm.comparator());
        assertEquals("a", sm.firstKey());
        assertEquals("c", sm.lastKey());
     }
        
     public void testOrder2()
     {  
        node.orderChildren();
        SortedMap<Object, Node> sm = (SortedMap) node.getChildrenMap();
        Node a = new NodeImpl(new Fqn("a"));
        Node b = new NodeImpl(new Fqn("b"));
        Node c = new NodeImpl(new Fqn("c"));
        sm.put("a", a);
        sm.put("b", b);
        sm.put("c", c);
        SortedSet<Node> ss = (SortedSet) node.getChildren();
        assertEquals(a, ss.first());
        assertEquals(c, ss.last());
     }
     */
     
  }
  
  
  



More information about the jboss-cvs-commits mailing list