Package com.google.enterprise.connector.util.diffing.testing

Examples of com.google.enterprise.connector.util.diffing.testing.FakeTraversalContext


    FileSystemTypeRegistry fileSystemTypeRegistry = new FileSystemTypeRegistry(
        Collections.singletonList(new JavaFileSystemType()));
    FileSystemPropertyManager propertyManager =
        new TestFileSystemPropertyManager();
    PathParser pathParser = new PathParser(fileSystemTypeRegistry);
    TraversalContext traversalContext = new FakeTraversalContext();
    MimeTypeDetector.setTraversalContext(traversalContext);
    MimeTypeDetector mimeTypeDetector = new MimeTypeDetector();

    DocumentContext context = new DocumentContext(
        null, null, null, mimeTypeDetector, propertyManager,
View Full Code Here


    }
  }

  public void testGetContentUnsupportedMimeType() throws Exception {
    MockReadonlyFile archive = root.addFile("test.jpg", TEST_DATA);
    TraversalContext traversalContext = new FakeTraversalContext() {
        @Override
        public int mimeTypeSupportLevel(String mimeType) {
          return 0;
        }
      };
View Full Code Here

    assertTrue(doc.toString().contains(foo.getPath()));
  }

  private DocumentContext makeContext(boolean pushAcls,
      boolean markAllDocumentsPublic) {
    MimeTypeDetector.setTraversalContext(new FakeTraversalContext());
    MimeTypeDetector mimeTypeDetector = new MimeTypeDetector();
    DocumentContext result = new DocumentContext(
        null, null, null, mimeTypeDetector,
        new TestFileSystemPropertyManager(pushAcls, markAllDocumentsPublic),
        null, null, null);
View Full Code Here

  @Override
  public void setUp() throws IOException {
    queue = new MockChangeQueue(BATCH_COUNT * BATCH_SIZE + EXTRA);
    monitorManager = new FakeDocumentSnapshotRepositoryMonitorManager(queue, this,
        new DeleteDocumentHandleFactory(), new MockDocumentHandleFactory());
    TraversalContext traversalContext = new FakeTraversalContext();
    TraversalContextManager tcm = new TraversalContextManager();
    tcm.setTraversalContext(traversalContext);
    tm = new DiffingConnectorTraversalManager(monitorManager, tcm);
    tm.setTraversalContext(new FakeTraversalContext());
    tm.setBatchHint(BATCH_SIZE);
  }
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.util.diffing.testing.FakeTraversalContext

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.