Package com.google.enterprise.connector.otex.client.mock

Examples of com.google.enterprise.connector.otex.client.mock.MockClient


  /** Inserts database test data. */
  protected void setUp() throws SQLException {
    jdbcFixture.setUp();
    insertRows(TREE_NODES);

    client = new MockClient();
  }
View Full Code Here


    connector.setGenealogistMinCacheSize(minCacheSize);
    connector.setGenealogistMaxCacheSize(maxCacheSize);
    connector.setUseDTreeAncestors(false);
    connector.setTrackDeletedItems(false);
    connector.login();
    Client client = new MockClient();
    return new LivelinkTraversalManager(connector, client, "Admin", client,
                                        new MockContentHandler()) {
      /** Slimmer select list to avoid having to mock extra columns. */
      @Override String[] getSelectList() {
        return new String[] { "DataID", "ModifyDate", "SubType", "MimeType" };
View Full Code Here

  private LivelinkTraversalManager getObjectUnderTest(Client traversalClient)
      throws RepositoryException {
    conn.login();
    return new LivelinkTraversalManager(conn, traversalClient, "Admin",
        new MockClient(), conn.getContentHandler(traversalClient));
  }
View Full Code Here

    testStartTraversal(false);
  }

  /** Positive test to set a baseline for testResumeTraversalPingError. */
  public void testResumeTraversal() throws RepositoryException {
    LivelinkTraversalManager ltm = getObjectUnderTest(new MockClient());

    DocumentList list = ltm.resumeTraversal("2011-10-16 14:13:52,12345");
    assertNotNull(list);
    assertNull(list.nextDocument());
  }
View Full Code Here

   * resumeTraversal. Legacy code returned null and triggered the
   * retry delay instead of the error wait.
   */
  public void testResumeTraversalPingError() throws RepositoryException {
    final RepositoryException expected = new RepositoryException();
    LivelinkTraversalManager ltm = getObjectUnderTest(new MockClient() {
        @Override
        public int GetCurrentUserID() throws RepositoryException {
          throw expected;
        }
      });
View Full Code Here

    conn.setIncludedLocationNodes("6");
    conn.login();
    conn.setUseDTreeAncestors(useDTreeAncestors);
    conn.setSqlWhereCondition(sqlWhereCondition);

    Client client = new MockClient();
    return new LivelinkTraversalManager(conn, client, "Admin", client,
        conn.getContentHandler(client));
  }
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.otex.client.mock.MockClient

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.