Package org.jboss.virtual.spi

Examples of org.jboss.virtual.spi.VirtualFileHandler


   }

   public void testChildName() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      assertEquals("child", child.getName());
   }
View Full Code Here


   }

   public void testSubFolderName() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "subfolder");
      assertEquals("subfolder", child.getName());
   }
View Full Code Here

   }

   public void testSubChildName() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "subfolder/subchild");
      assertTrue(child.getName().endsWith("subchild"));
   }
View Full Code Here

   }
  
   public void testRootPathName() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      assertEquals("", root.getPathName());
   }
View Full Code Here

   }

   public void testChildPathName() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      assertEquals("child", child.getPathName());
   }
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());
   }
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());
   }
View Full Code Here

    * @throws Exception
    */
   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();
      while( iter.hasNext() )
      {
         child = iter.next();
View Full Code Here

   */
  
   public void testRootLastModified() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler root = context.getRoot();
      long realLastModified = getRealLastModified("simple", null);
      // strip any milliseconds
      realLastModified = realLastModified / 1000 * 1000;
      long fileLastModified = root.getLastModified();
      fileLastModified = fileLastModified / 1000 * 1000;
      assertEquals(realLastModified, fileLastModified);
   }
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());
   }
View Full Code Here

TOP

Related Classes of org.jboss.virtual.spi.VirtualFileHandler

Copyright © 2018 www.massapicom. 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.