Package org.jboss.virtual

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


      MockVFSContext context = registerSimpleVFSContext();
     
      VFS vfs = VFS.getVFS(context.getRootURI());
      MockVirtualFileFilter filter = new MockVirtualFileFilter();
      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter);
      vfs.visit(visitor);
      List<VirtualFile> matched = visitor.getMatched();
      assertNotNull(matched);
      assertEmpty(matched);
   }
View Full Code Here


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

      VFS vfs = VFS.getVFS(context.getRootURI());
      MockVirtualFileFilter filter = new MockVirtualFileFilter();
      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter);
      try
      {
         vfs.visit(visitor);
         fail("Should not be here!");
      }
      catch (Throwable t)
      {
         checkThrowable(IOException.class, t);
View Full Code Here

   }
  
   protected void testVisit(MockVFSContext context, MockVirtualFileVisitor visitor, HashSet<String> expected) throws Exception
   {
      VFS vfs = context.getVFS();
      vfs.visit(visitor);
     
      HashSet<String> actual = new HashSet<String>();
      for (VirtualFile file : visitor.getVisited())
         actual.add(file.getPathName());
      assertEquals(expected, actual);
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.