Package org.jboss.virtual.spi

Examples of org.jboss.virtual.spi.VFSContext.findChild()


   public void testSubFolderIsLeaf() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "subfolder");
      assertFalse(child.isLeaf());
   }

   public void testSubChildIsLeaf() throws Exception
   {
View Full Code Here


   public void testSubChildIsLeaf() throws Exception
   {
      VFSContext context = getVFSContext("complex");
      VirtualFileHandler root = context.getRoot();
      VirtualFileHandler child = context.findChild(root, "subfolder/subchild");
      assertTrue(child.isLeaf());
   }

   public void testIsLeafClosed() throws Exception
   {
View Full Code Here

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

   // 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());
   }

   public void testIsHiddenClosed() throws Exception
   {
View Full Code Here

   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

   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

   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

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

   public void testgetParentClosed() throws Exception
   {
View Full Code Here

   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

   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

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.