Package org.jboss.virtual.spi

Examples of org.jboss.virtual.spi.VirtualFileHandler


   }

   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!");
      }
      catch (Throwable t)
      {
         checkThrowable(IllegalStateException.class, t);
View Full Code Here


   }
  
   public void testRootSize() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler root = context.getRoot();
      long realSize = getRealSize("simple", null);
      assertEquals(realSize, root.getSize());
   }
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());
   }
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!");
      }
      catch (Throwable t)
      {
         checkThrowable(IllegalStateException.class, t);
View Full Code Here

   }
  
   public void testRootIsLeaf() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      assertFalse(root.isLeaf());
   }
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());
   }
View Full Code Here

   }

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

   }

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

   }

   public void testIsLeafClosed() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      child.close();
      try
      {
         child.isLeaf();
         fail("Should not be here!");
      }
      catch (Throwable t)
      {
         checkThrowable(IllegalStateException.class, t);
View Full Code Here

   // TODO how to test a real hidden file across platforms?
   public void testRootIsHidden() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler root = context.getRoot();
      assertFalse(root.isHidden());
   }
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.