Package org.jboss.virtual.spi

Examples of org.jboss.virtual.spi.VirtualFileHandler


   }
  
   public void testHashCode() throws Exception
   {
      MockVFSContext context = registerSimpleVFSContext();
      VirtualFileHandler handler = context.getRoot();
     
      VirtualFile file = VFS.getRoot(context.getRootURI());
      assertEquals(handler.hashCode(), file.hashCode());
   }
View Full Code Here


   }

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

   }

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

   }

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

   }

   public void testFindChildSubChild() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler found = root.findChild("subfolder/subchild");
      assertEquals("subfolder/subchild", found.getPathName());
   }
View Full Code Here

   }

   public void testFindChildDoesNotExist() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      try
      {
         root.findChild("doesnotexist");
         fail("Should not be here!");
      }
      catch (Throwable t)
      {
         checkThrowableTemp(IOException.class, t);
View Full Code Here

   }

   public void testFindChildNullPath() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      try
      {
         root.findChild(null);
         fail("Should not be here!");
      }
      catch (Throwable t)
      {
         checkThrowable(IllegalArgumentException.class, t);
View Full Code Here

   }

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

   }

   public void testGetVFSContext() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler handler = context.getRoot();
      assertEquals(context, handler.getVFSContext());
   }
View Full Code Here

   }

   public void testGetVFSContextClosed() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      child.close();
      try
      {
         child.getVFSContext();
         fail("Should not be here!");
      }
      catch (Throwable t)
      {
         checkThrowable(IllegalStateException.class, t);
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.