Package org.jboss.virtual.spi

Examples of org.jboss.virtual.spi.VFSContext.findChild()


   public void testChildPathName() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      assertEquals("child", child.getPathName());
   }

   public void testSubFolderPathName() throws Exception
   {
View Full Code Here


   public void testSubFolderPathName() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "subfolder");
      assertEquals("subfolder", child.getPathName());
   }

   public void testSubChildPathName() throws Exception
   {
View Full Code Here

   public void testSubChildPathName() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "subfolder/subchild");
      assertEquals("subfolder/subchild", child.getPathName());
   }

   /**
    * Test that finding a child and listing its parent result in consistent
View Full Code Here

    */
   public void testSubSubChildPathName() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "subfolder/subsubfolder/subsubchild");
      assertEquals("subfolder/subsubfolder/subsubchild", child.getPathName());
      VirtualFileHandler parent = context.findChild(root, "subfolder/subsubfolder");
      List<VirtualFileHandler> children = parent.getChildren(false);
      // Filter out an .svn stuff since this is run from the source tree
      Iterator<VirtualFileHandler> iter = children.iterator();
View Full Code Here

   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "subfolder/subsubfolder/subsubchild");
      assertEquals("subfolder/subsubfolder/subsubchild", child.getPathName());
      VirtualFileHandler parent = context.findChild(root, "subfolder/subsubfolder");
      List<VirtualFileHandler> children = parent.getChildren(false);
      // Filter out an .svn stuff since this is run from the source tree
      Iterator<VirtualFileHandler> iter = children.iterator();
      while( iter.hasNext() )
      {
View Full Code Here

  
   public void testChildLastModified() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      long realLastModified = getRealLastModified("simple", "child");
      assertEquals(realLastModified, child.getLastModified());
   }

   public void testGetLastModifiedClosed() throws Exception
View Full Code Here

   public void testGetLastModifiedClosed() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      child.close();
      try
      {
         child.getLastModified();
         fail("Should not be here!");
View Full Code Here

  
   public void testChildSize() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      long realSize = getRealSize("simple", "child");
      assertEquals(realSize, child.getSize());
   }

   public void testGetSizeClosed() throws Exception
View Full Code Here

   public void testGetSizeClosed() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      child.close();
      try
      {
         child.getSize();
         fail("Should not be here!");
View Full Code Here

   public void testChildIsLeaf() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      assertTrue(child.isLeaf());
   }

   public void testSubFolderIsLeaf() throws Exception
   {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.