Package com.google.enterprise.connector.mock

Examples of com.google.enterprise.connector.mock.MockRepositoryDocumentStore


    if (query.equals("") || query.indexOf("dm_audittrail") != -1) {
      return null;
    } else if (query.startsWith(XPATH_QUERY_STRING_UNBOUNDED_DEFAULT
        .substring(0, 15))) {
      try {
        MockRepositoryDocumentStore a = null;
        a = ((MockDmSession) session).getStore();
        MockJcrQueryManager mrQueryMger = new MockJcrQueryManager(a);

        Query q = mrQueryMger.createQuery(this.query, "xpath");
View Full Code Here


    sess7 = sessionManager.getSession(DmInitialize.DM_DOCBASE);
  }

  public void testNextAndGetString() {
    try {
      MockRepositoryDocumentStore mrDS = ((MockDmSession) sess7)
          .getStore();
      MockJcrQueryManager mrQueryMger = new MockJcrQueryManager(mrDS);
      Query q = null;
      QueryResult qr = null;
      try {
View Full Code Here

    sessionManager.setIdentity(DmInitialize.DM_DOCBASE, ili);
    sess7 = sessionManager.getSession(DmInitialize.DM_DOCBASE);
  }

  public void testGetStore() {
    MockRepositoryDocumentStore a = null;

    a = ((MockDmSession) sess7).getStore();
    assertNotNull(a);
    MockRepositoryDocument mockDoc = a.getDocByID(DmInitialize.DM_ID1);
    String docID = mockDoc.getDocID();
    assertEquals(docID, DmInitialize.DM_ID1);
  }
View Full Code Here

*/
public class MockMockList extends ArrayList<MockRepositoryDocument> {
  MockMockList(String[] ids, ISessionManager sessionManager, String docbase)
      throws RepositoryLoginException, RepositoryException {
    String claimant = sessionManager.getIdentity(docbase).getUser();
    MockRepositoryDocumentStore store = ((MockDmSession) sessionManager
        .getSession(docbase)).getStore();
    for (int j = 0; j < ids.length; j++) {
      MockRepositoryDocument doc = store.getDocByID(ids[j]);// if no
      // 'content'
      // defined,
      // doc==null
      if (doc != null) {
        MockRepositoryPropertyList pl = doc.getProplist();
View Full Code Here

  /**
   * Sanity test
   * @throws RepositoryException
   */
  public void testSimpleIterator() throws RepositoryException {
    MockRepositoryDocumentStore mrd = new MockRepositoryDocumentStore();
    MockRepositoryEventList mrel =
        new MockRepositoryEventList("MockRepositoryEventLog1.txt");
    for (MockRepositoryEvent event : mrel.getEventList()) {
      mrd.applyEvent(event);
    }

    // create an node iterator over the entire store
    NodeIterator ni = new MockJcrNodeIterator(mrd.iterator());

    Node n;
    while (ni.hasNext()) {
      n = ni.nextNode();
      logger.info(JCR_UUID + " " + n.getProperty(JCR_UUID).getString());
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.mock.MockRepositoryDocumentStore

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.