Examples of Vfs


Examples of org.jboss.virtual.VFS

   {
      MockVFSContext context = registerStructuredVFSContextWithSubChildren();

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

Examples of org.jboss.virtual.VFS

      MockVFSContext context = registerSimpleVFSContextWithChildren();
      context.getMockRoot().setIOException("findChild");

      try
      {
         VFS vfs = VFS.getVFS(context.getRootURI());
         vfs.findChild("child1");
         fail("Should not be here");
      }
      catch (Throwable t)
      {
         checkThrowable(IOException.class, t);
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());
      List<VirtualFile> children = vfs.getChildren();
      assertNotNull(children);
     
      List<VirtualFile> expected = new ArrayList<VirtualFile>();
      expected.add(child1);
      expected.add(child2);
View Full Code Here

Examples of org.jboss.virtual.VFS

      MockVFSContext context = registerStructuredVFSContextWithSubChildren();
      VirtualFile child1 = getChildHandler(context, "child1").getVirtualFile();
      VirtualFile child2 = getChildHandler(context, "child2").getVirtualFile();
      VirtualFile child3 = getChildHandler(context, "child3").getVirtualFile();
     
      VFS vfs = VFS.getVFS(context.getRootURI());
      List<VirtualFile> children = vfs.getChildren();
      assertNotNull(children);
     
      List<VirtualFile> expected = new ArrayList<VirtualFile>();
      expected.add(child1);
      expected.add(child2);
View Full Code Here

Examples of org.jboss.virtual.VFS

   public void testGetAllChildrenNoChildren() throws Exception
   {
      MockVFSContext context = registerSimpleVFSContext();
      context.getMockRoot().setLeaf(false);
     
      VFS vfs = VFS.getVFS(context.getRootURI());
      List<VirtualFile> children = vfs.getChildren();
      assertNotNull(children);
     
      assertEmpty(children);
   }
View Full Code Here

Examples of org.jboss.virtual.VFS

   public void testGetAllChildrenIsLeaf() throws Exception
   {
      MockVFSContext context = registerSimpleVFSContext();
     
      VFS vfs = VFS.getVFS(context.getRootURI());
      try
      {
         vfs.getChildren();
         fail("Should not be here!");
      }
      catch (Throwable t)
      {
         checkThrowable(IllegalStateException.class, t);
View Full Code Here

Examples of org.jboss.virtual.VFS

   public void testGetAllChildrenIOException() throws Exception
   {
      MockVFSContext context = registerSimpleVFSContextWithChildren();
      context.getMockRoot().setIOException("getChildren");
     
      VFS vfs = VFS.getVFS(context.getRootURI());
      try
      {
         vfs.getChildren();
         fail("Should not be here!");
      }
      catch (Throwable t)
      {
         checkThrowable(IOException.class, t);
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());
      List<VirtualFile> children = vfs.getChildren(null);
      assertNotNull(children);
     
      List<VirtualFile> expected = new ArrayList<VirtualFile>();
      expected.add(child1);
      expected.add(child2);
View Full Code Here

Examples of org.jboss.virtual.VFS

      MockVFSContext context = registerStructuredVFSContextWithSubChildren();
      VirtualFile child1 = getChildHandler(context, "child1").getVirtualFile();
      VirtualFile child2 = getChildHandler(context, "child2").getVirtualFile();
      VirtualFile child3 = getChildHandler(context, "child3").getVirtualFile();
     
      VFS vfs = VFS.getVFS(context.getRootURI());
      List<VirtualFile> children = vfs.getChildren(null);
      assertNotNull(children);
     
      List<VirtualFile> expected = new ArrayList<VirtualFile>();
      expected.add(child1);
      expected.add(child2);
View Full Code Here

Examples of org.jboss.virtual.VFS

    */
   public void testInnerJarFile()
      throws Exception
   {
      URL rootURL = getResource("/vfs/test");
      VFS vfs = VFS.getVFS(rootURL);
      VirtualFile outerjar = vfs.findChild("outer.jar");
      assertTrue("outer.jar != null", outerjar != null);
      VirtualFile jar1 = outerjar.findChild("jar1.jar");
      assertTrue("outer.jar/jar1.jar != null", jar1 != null);
      VirtualFile jar2 = outerjar.findChild("jar2.jar");
      assertTrue("outer.jar/jar2.jar != null", jar2 != null);
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.