Examples of VFSContext


Examples of org.jboss.virtual.spi.VFSContext

   }
  
   // TODO how to test a real hidden file across platforms?
   public void testChildIsHidden() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      assertFalse(child.isHidden());
   }
View Full Code Here

Examples of org.jboss.virtual.spi.VFSContext

      assertFalse(child.isHidden());
   }

   public void testIsHiddenClosed() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      child.close();
      try
      {
         child.isHidden();
         fail("Should not be here!");
View Full Code Here

Examples of org.jboss.virtual.spi.VFSContext

      }
   }

   public void testOpenStream() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      InputStream stream = child.openStream();
      try
      {
         byte[] contents = new byte[10];
         int read = stream.read(contents);
View Full Code Here

Examples of org.jboss.virtual.spi.VFSContext

      }
   }

   public void testOpenStreamClosed() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      child.close();
      try
      {
         child.openStream();
         fail("Should not be here!");
View Full Code Here

Examples of org.jboss.virtual.spi.VFSContext

      }
   }

   public void testRootParent() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler root = context.getRoot();
      assertNull(root.getParent());
   }
View Full Code Here

Examples of org.jboss.virtual.spi.VFSContext

      assertNull(root.getParent());
   }
  
   public void testChildParent() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      assertEquals(root, child.getParent());
   }
View Full Code Here

Examples of org.jboss.virtual.spi.VFSContext

      assertEquals(root, child.getParent());
   }

   public void testgetParentClosed() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      child.close();
      try
      {
         child.getParent();
         fail("Should not be here!");
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 = root.getChildren(false);
     
      Set<String> expected = new HashSet<String>();
      expected.add("child1");
      expected.add("child2");
View Full Code Here

Examples of org.jboss.virtual.spi.VFSContext

      assertEquals(expected, actual);
   }

   public void testGetChildrenClosed() throws Exception
   {
      VFSContext context = getVFSContext("simple");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "child");
      child.close();
      try
      {
         child.getChildren(false);
         fail("Should not be here!");
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 = root.findChild("");
      assertEquals(root, found);
   }
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.