Package org.jboss.test.virtual.support

Examples of org.jboss.test.virtual.support.MockVirtualFileHandlerVisitor


   public void testVisit() throws Exception
   {
      VFSContext context = getVFSContext("children");
      VirtualFileHandler root = context.getRoot();
      MockVirtualFileHandlerVisitor visitor = new MockVirtualFileHandlerVisitor();
      context.visit(root, visitor);
     
      Set<String> expected = new HashSet<String>();
      expected.add("child1");
      expected.add("child2");
      expected.add("child3");

      Set<String> actual = new HashSet<String>();
      for (VirtualFileHandler child : visitor.getVisited())
      {
         if (child.getName().startsWith("META-INF") == false && child.getName().equals(".svn") == false)
            actual.add(child.getName());
      }
     
View Full Code Here


   }

   public void testVisitNullHandler() throws Exception
   {
      VFSContext context = getVFSContext("children");
      MockVirtualFileHandlerVisitor visitor = new MockVirtualFileHandlerVisitor();
      try
      {
         context.visit(null, visitor);
         fail("Should not be here!");
      }
View Full Code Here

      assertEquals(fileName, child.getName());
   }

   public void testVisit() throws Exception
   {
      MockVirtualFileHandlerVisitor visitor = new MockVirtualFileHandlerVisitor();

      Set<String> expected = new HashSet<String>();
      expected.add("child1");
      expected.add("child2");
      expected.add("child3");
View Full Code Here

   public void testVisitWithRoot() throws Exception
   {
      VisitorAttributes attributes = new VisitorAttributes();
      attributes.setIncludeRoot(true);
      attributes.setRecurseFilter(VisitorAttributes.RECURSE_ALL);
      MockVirtualFileHandlerVisitor visitor = new MockVirtualFileHandlerVisitor(attributes);

      Set<String> expected = new HashSet<String>();
      expected.add("children" + getSuffix());
      expected.add("child1");
      expected.add("child2");
View Full Code Here

   }

   public void testVisitNullHandler() throws Exception
   {
      VFSContext context = getVFSContext("children");
      MockVirtualFileHandlerVisitor visitor = new MockVirtualFileHandlerVisitor();
      try
      {
         context.visit(null, visitor);
         fail("Should not be here!");
      }
View Full Code Here

TOP

Related Classes of org.jboss.test.virtual.support.MockVirtualFileHandlerVisitor

Copyright © 2018 www.massapicom. 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.