Package org.jboss.virtual

Examples of org.jboss.virtual.VFS.findChild()


      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


      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

      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

      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

   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

   public void testFindResource()
      throws Exception
   {
      URL rootURL = getResource("/vfs/test");
      VFS vfs = VFS.getVFS(rootURL);
      VirtualFile jar = vfs.findChild("outer.jar");
      assertTrue("outer.jar != null", jar != null);

      /*
      ArrayList<String> searchCtx = new ArrayList<String>();
      searchCtx.add("outer.jar");
View Full Code Here

   public void testFindResourceUsingURLStream()
      throws Exception
   {
      URL rootURL = getResource("/vfs/test");
      VFS vfs = VFS.getVFS(rootURL);
      VirtualFile jar = vfs.findChild("outer.jar");
      assertTrue("outer.jar != null", jar != null);

      /*
      ArrayList<String> searchCtx = new ArrayList<String>();
      searchCtx.add("outer.jar");
View Full Code Here

   public void testFindResourceInFilesOnlyJar()
      throws Exception
   {
      URL rootURL = getResource("/vfs/test");
      VFS vfs = VFS.getVFS(rootURL);
      VirtualFile jar = vfs.findChild("jar1-filesonly.jar");
      assertTrue("jar1-filesonly.jar != null", jar != null);

      VirtualFile metaInf = jar.findChild("META-INF/MANIFEST.MF");
      assertTrue("META-INF/MANIFEST.MF != null", metaInf != null);
      InputStream mfIS = metaInf.toURL().openStream();
View Full Code Here

      throws Exception
   {
      URL rootURL = getResource("/vfs/test");
      VFS vfs = VFS.getVFS(rootURL);

      VirtualFile war2 = vfs.findChild("WarDeployApp_web.war");
      assertTrue("WarDeployApp_web.war != null", war2 != null);

      VirtualFile classes2 = war2.findChild("WEB-INF/classes");
      assertTrue("WEB-INF/classes != null", classes2 != null);
      assertTrue("WEB-INF/classes is not a leaf", classes2.isLeaf()==false);
View Full Code Here

      VirtualFile HelloJavaBean = classes2.findChild("com/sun/ts/tests/webservices/deploy/warDeploy/HelloJavaBean.class");
      assertTrue("HelloJavaBean.class != null", HelloJavaBean != null);
      assertTrue("HelloJavaBean.class is a leaf", HelloJavaBean.isLeaf());

      VirtualFile war = vfs.findChild("filesonly.war");
      assertTrue("filesonly.war != null", war != null);

      VirtualFile classes = war.findChild("WEB-INF/classes");
      assertTrue("WEB-INF/classes != null", classes != null);
      assertTrue("WEB-INF/classes is not a leaf", classes.isLeaf()==false);
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.