Examples of Vfs


Examples of org.jboss.virtual.VFS

   private void writeObject(ObjectOutputStream out) throws IOException, URISyntaxException
   {
      URL url = rootUrl;
      if (url == null)
      {
         VFS vfs = getRoot().getVFS();
         url = vfs.getRoot().toURL();
      }
      String pathName = path;
      if (pathName == null)
         pathName = getRoot().getPathName();
View Full Code Here

Examples of org.jboss.virtual.VFS

   public void testGetVFSURI() throws Exception
   {
      MockVFSContext context = registerSimpleVFSContext();
      MockVFSContext context2 = registerSimple2VFSContext();
     
      VFS vfs = VFS.getVFS(context.getRootURI());
      assertNotNull(vfs);
      assertEquals(context.getVFS(), vfs);
     
      VFS vfs2 = VFS.getVFS(context2.getRootURI());
      assertNotNull(vfs2);
      assertEquals(context2.getVFS(), vfs2);
   }
View Full Code Here

Examples of org.jboss.virtual.VFS

   public void testGetVFSURL() throws Exception
   {
      MockVFSContext context = registerSimpleVFSContext();
      MockVFSContext context2 = registerSimple2VFSContext();
     
      VFS vfs = VFS.getVFS(context.getRootURL());
      assertNotNull(vfs);
      assertEquals(context.getVFS(), vfs);
     
      VFS vfs2 = VFS.getVFS(context2.getRootURL());
      assertNotNull(vfs2);
      assertEquals(context2.getVFS(), vfs2);
   }
View Full Code Here

Examples of org.jboss.virtual.VFS

   public void testGetRoot() throws Exception
   {
      MockVFSContext context = registerSimpleVFSContext();
     
      VFS vfs = VFS.getVFS(context.getRootURI());
      assertNotNull(vfs);

      VirtualFile root = vfs.getRoot();
      assertNotNull(root);
     
      assertEquals(context.getRoot().getVirtualFile(), root);
   }
View Full Code Here

Examples of org.jboss.virtual.VFS

   public void testGetRootIOException() throws Exception
   {
      MockVFSContext context = registerSimpleVFSContext();
      context.setIOException("getRoot");
     
      VFS vfs = VFS.getVFS(context.getRootURI());
      assertNotNull(vfs);

      try
      {
         vfs.getRoot();
         fail("Should not be here");
      }
      catch (Throwable t)
      {
         checkThrowable(IOException.class, t);
View Full Code Here

Examples of org.jboss.virtual.VFS

   public void testFindChildRoot() throws Exception
   {
      MockVFSContext context = registerSimpleVFSContext();
      context.getMockRoot().setLeaf(false);
     
      VFS vfs = VFS.getVFS(context.getRootURI());
     
      assertFindChild(vfs, "", vfs.getRoot());
   }
View Full Code Here

Examples of org.jboss.virtual.VFS

      MockVFSContext context = registerSimpleVFSContextWithChildren();
      VirtualFile child1 = getChildHandler(context, "child1").getVirtualFile();
      VirtualFile child2 = getChildHandler(context, "child2").getVirtualFile();
      VirtualFile child3 = getChildHandler(context, "child3").getVirtualFile();
     
      VFS vfs = VFS.getVFS(context.getRootURI());
      assertFindChild(vfs, "child1", child1);
      assertFindChild(vfs, "child2", child2);
      assertFindChild(vfs, "child3", child3);
   }
View Full Code Here

Examples of org.jboss.virtual.VFS

      VirtualFile child3 = getChildHandler(context, "child3").getVirtualFile();
      VirtualFile child31 = getChildHandler(context, "child3/child3,1").getVirtualFile();
      VirtualFile child32 = getChildHandler(context, "child3/child3,2").getVirtualFile();
      VirtualFile child33 = getChildHandler(context, "child3/child3,3").getVirtualFile();
     
      VFS vfs = VFS.getVFS(context.getRootURI());
      assertFindChild(vfs, "child1", child1);
      assertFindChild(vfs, "child1/child1,1", child11);
      assertFindChild(vfs, "child2", child2);
      assertFindChild(vfs, "child2/child2,1", child21);
      assertFindChild(vfs, "child2/child2,2", child22);
View Full Code Here

Examples of org.jboss.virtual.VFS

   {
      MockVFSContext context = registerSimpleVFSContextWithChildren();

      try
      {
         VFS vfs = VFS.getVFS(context.getRootURI());
         vfs.findChild(null);
         fail("Should not be here");
      }
      catch (Throwable t)
      {
         checkThrowable(IllegalArgumentException.class, t);
View Full Code Here

Examples of org.jboss.virtual.VFS

   {
      MockVFSContext context = registerSimpleVFSContextWithChildren();

      try
      {
         VFS vfs = VFS.getVFS(context.getRootURI());
         vfs.findChild("doesnotexist");
         fail("Should not be here");
      }
      catch (Throwable t)
      {
         checkThrowable(IOException.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.