Package org.jboss.test.virtual.support

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


      return context;
   }
  
   protected MockVFSContext createStructuredVFSContextWithSubChildren()
   {
      MockVFSContext context = new MockVFSContext("simpleWithChildren");
      MockStructuredVirtualFileHandler root = new MockStructuredVirtualFileHandler(context, null, "");
      context.setRoot(root);
      MockStructuredVirtualFileHandler child1 = new MockStructuredVirtualFileHandler(context, root, "child1");
      new MockStructuredVirtualFileHandler(context, child1, "child1,1");
      MockStructuredVirtualFileHandler child2 = new MockStructuredVirtualFileHandler(context, root, "child2");
      new MockStructuredVirtualFileHandler(context, child2, "child2,1");
      new MockStructuredVirtualFileHandler(context, child2, "child2,2");
View Full Code Here


      return context;
   }
  
   protected MockVFSContext registerStructuredVFSContextWithSubChildren()
   {
      MockVFSContext context = createStructuredVFSContextWithSubChildren();
      mockVFSContextFactory.addVFSContext(context);
      return context;
   }
View Full Code Here

      return context;
   }
  
   protected MockVFSContext createStructuredVFSContextWithChildrenAndNonLeafs()
   {
      MockVFSContext context = new MockVFSContext("simpleWithChildren");
      MockStructuredVirtualFileHandler root = new MockStructuredVirtualFileHandler(context, null, "");
      context.setRoot(root);
      new MockStructuredVirtualFileHandler(context, root, "child1");
      new MockStructuredVirtualFileHandler(context, root, "child2");
      new MockStructuredVirtualFileHandler(context, root, "child3");
      MockStructuredVirtualFileHandler folder1 = new MockStructuredVirtualFileHandler(context, root, "folder1");
      folder1.setLeaf(false);
View Full Code Here

      return context;
   }
  
   protected MockVFSContext registerStructuredVFSContextWithChildrenAndNonLeafs()
   {
      MockVFSContext context = createStructuredVFSContextWithChildrenAndNonLeafs();
      mockVFSContextFactory.addVFSContext(context);
      return context;
   }
View Full Code Here

      return context;
   }
  
   protected MockVFSContext createStructuredVFSContextWithChildrenAndNonLeafsWithHidden()
   {
      MockVFSContext context = new MockVFSContext("simpleWithChildren");
      MockStructuredVirtualFileHandler root = new MockStructuredVirtualFileHandler(context, null, "");
      context.setRoot(root);
      MockStructuredVirtualFileHandler child1 = new MockStructuredVirtualFileHandler(context, root, "child1");
      child1.setHidden(true);
      new MockStructuredVirtualFileHandler(context, root, "child2");
      new MockStructuredVirtualFileHandler(context, root, "child3");
      MockStructuredVirtualFileHandler folder1 = new MockStructuredVirtualFileHandler(context, root, "folder1");
View Full Code Here

      return context;
   }
  
   protected MockVFSContext registerStructuredVFSContextWithChildrenAndNonLeafsWithHidden()
   {
      MockVFSContext context = createStructuredVFSContextWithChildrenAndNonLeafsWithHidden();
      mockVFSContextFactory.addVFSContext(context);
      return context;
   }
View Full Code Here

      return new TestSuite(VisitorUnitTestCase.class);
   }
  
   public void testDefaultVisitSimple() throws Exception
   {
      MockVFSContext context = createSimpleVFSContextWithChildrenAndNonLeafs();
      MockVirtualFileVisitor visitor = new MockVirtualFileVisitor();
      HashSet<String> expected = new HashSet<String>();
      expected.add("child1");
      expected.add("child2");
      expected.add("child3");
View Full Code Here

      testVisit(context, visitor, expected);
   }
  
   public void testDefaultVisitStructured() throws Exception
   {
      MockVFSContext context = createStructuredVFSContextWithChildrenAndNonLeafs();
      MockVirtualFileVisitor visitor = new MockVirtualFileVisitor();
      HashSet<String> expected = new HashSet<String>();
      expected.add("child1");
      expected.add("child2");
      expected.add("child3");
View Full Code Here

      testVisit(context, visitor, expected);
   }
  
   public void testLeavesOnlyVisitSimple() throws Exception
   {
      MockVFSContext context = createSimpleVFSContextWithChildrenAndNonLeafs();
      MockVirtualFileVisitor visitor = new MockVirtualFileVisitor(VisitorAttributes.LEAVES_ONLY);
      HashSet<String> expected = new HashSet<String>();
      expected.add("child1");
      expected.add("child2");
      expected.add("child3");
View Full Code Here

      testVisit(context, visitor, expected);
   }
  
   public void testLeavesOnlyVisitStructured() throws Exception
   {
      MockVFSContext context = createStructuredVFSContextWithChildrenAndNonLeafs();
      MockVirtualFileVisitor visitor = new MockVirtualFileVisitor(VisitorAttributes.LEAVES_ONLY);
      HashSet<String> expected = new HashSet<String>();
      expected.add("child1");
      expected.add("child2");
      expected.add("child3");
View Full Code Here

TOP

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

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.