Examples of VFSContext


Examples of org.jboss.virtual.spi.VFSContext

   }
   */
  
   public void testGetVFS() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      URI rootURI = context.getRootURI();
      VFS vfs = context.getVFS();
      VirtualFile rootFile = vfs.getRoot();
     
      assertEquals(new URI("vfs" + rootURI), rootFile.toURI());
   }
View Full Code Here

Examples of org.jboss.virtual.spi.VFSContext

      assertEquals(new URI("vfs" + rootURI), rootFile.toURI());
   }
  
   public void testGetRoot() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      URI rootURI = context.getRootURI();
      VirtualFileHandler rootHandler = context.getRoot();
      VFS vfs = context.getVFS();
      VirtualFile rootFile = vfs.getRoot();
     
      assertEquals(rootURI, rootHandler.toURI());
      assertEquals(rootHandler.getVirtualFile(), rootFile);
   }
View Full Code Here

Examples of org.jboss.virtual.spi.VFSContext

   }
   */
  
   public void testGetChildren() throws Exception
   {
      VFSContext context = getVFSContext("children");
      VirtualFileHandler root = context.getRoot();
      List<VirtualFileHandler> children = context.getChildren(root, false);
     
      Set<String> expected = new HashSet<String>();
      expected.add("child1");
      expected.add("child2");
      expected.add("child3");
View Full Code Here

Examples of org.jboss.virtual.spi.VFSContext

      assertEquals(expected, actual);
   }

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

Examples of org.jboss.virtual.spi.VFSContext

      }
   }

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

Examples of org.jboss.virtual.spi.VFSContext

      assertEquals(root, found);
   }

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

Examples of org.jboss.virtual.spi.VFSContext

      assertEquals("child", found.getPathName());
   }

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

Examples of org.jboss.virtual.spi.VFSContext

      assertEquals("subfolder", found.getPathName());
   }

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

Examples of org.jboss.virtual.spi.VFSContext

      assertEquals("subfolder/subchild", found.getPathName());
   }

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

Examples of org.jboss.virtual.spi.VFSContext

      }
   }

   public void testFindChildNullFile() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      try
      {
         context.findChild(null, "");
         fail("Should not be here!");
      }
      catch (Throwable t)
      {
         checkThrowable(IllegalArgumentException.class, t);
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.