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

Examples of com.google.enterprise.connector.notes.client.mock.NotesDatabaseMock.addDocument()


        databaseDocument.addItem(new NotesItemMock("name",
            NCCONST.DITM_REPLICAID, "type", NotesItem.TEXT,
            "values", "jtmreplicaid0123"));
        databaseDocument.addItem(new NotesItemMock("name", NCCONST.DITM_SERVER,
            "type", NotesItem.TEXT, "values", "JediServer"));
        configDatabase.addDocument(databaseDocument, NCCONST.VIEWDATABASES);
        databaseDocument = new NotesDocumentMock();
        databaseDocument.addItem(new NotesItemMock("name", NCCONST.DITM_DBNAME,
            "type", NotesItem.TEXT, "values", "SenateExpenseReports.nsf"));
        databaseDocument.addItem(new NotesItemMock("name",
            NCCONST.DITM_REPLICAID, "type", NotesItem.TEXT,
View Full Code Here


        databaseDocument.addItem(new NotesItemMock("name",
            NCCONST.DITM_REPLICAID, "type", NotesItem.TEXT,
            "values", "serreplicaid0123"));
        databaseDocument.addItem(new NotesItemMock("name", NCCONST.DITM_SERVER,
            "type", NotesItem.TEXT, "values", "SenateServer"));
        configDatabase.addDocument(databaseDocument, NCCONST.VIEWDATABASES);
        databaseDocument = new NotesDocumentMock();
        databaseDocument.addItem(new NotesItemMock("name", NCCONST.DITM_DBNAME,
            "type", NotesItem.TEXT, "values", "EvilSeparatistPlots.nsf"));
        databaseDocument.addItem(new NotesItemMock("name",
            NCCONST.DITM_REPLICAID, "type", NotesItem.TEXT,
View Full Code Here

        databaseDocument.addItem(new NotesItemMock("name",
            NCCONST.DITM_REPLICAID, "type", NotesItem.TEXT,
            "values", "espreplicaid0123"));
        databaseDocument.addItem(new NotesItemMock("name", NCCONST.DITM_SERVER,
            "type", NotesItem.TEXT, "values", "SenateServer"));
        configDatabase.addDocument(databaseDocument, NCCONST.VIEWDATABASES);

        NotesDatabaseMock notesDatabase = new NotesDatabaseMock(
            "JediServer", "JediTrainingManuals.nsf", "jtmreplicaid0123");
        ((NotesSessionMock) session).addDatabase(notesDatabase);
        NotesACLMock acl = new NotesACLMock();
View Full Code Here

        "values", "TEMPLATE"));
    docTmpl.addItem(new NotesItemMock("name", "TemplateName", "type",
        NotesItem.TEXT, "values", "Discussion"));
    docTmpl.addItem(new NotesItemMock("name", "SearchString", "type",
        NotesItem.TEXT, "values", searchString));
    configDatabase.addDocument(docTmpl, NCCONST.VIEWTEMPLATES);
    configDatabase.setViewFields(NCCONST.VIEWTEMPLATES, "TemplateName");

    // Run check for deletion
    Map<String, NotesDocId> docs =
        notesDocMgrDbTest.getIndexedDocument(null, null, 1);
View Full Code Here

    NotesDocumentMock docTmpl = new NotesDocumentMock();
    docTmpl.addItem(new NotesItemMock("name", "Form", "type", NotesItem.TEXT,
        "values", "TEMPLATE"));
    docTmpl.addItem(new NotesItemMock("name", "TemplateName", "type",
        NotesItem.TEXT, "values", "Discussion"));
    configDatabase.addDocument(docTmpl, NCCONST.VIEWTEMPLATES);

    // Run deletion check to capture error logs
    Map<String,NotesDocId> docs =
        notesDocMgrDbTest.getIndexedDocument(null, null, 1);
    NotesDocId startUnid = docs.get(docs.keySet().iterator().next());
View Full Code Here

        "values", "TEMPLATE"));
    docTmpl.addItem(new NotesItemMock("name", "TemplateName", "type",
        NotesItem.TEXT, "values", "Discussion"));
    docTmpl.addItem(new NotesItemMock("name", "SearchString", "type",
        NotesItem.TEXT, "values", searchString));
    configDatabase.addDocument(docTmpl, NCCONST.VIEWTEMPLATES);
    configDatabase.setViewFields(NCCONST.VIEWTEMPLATES, "TemplateName");

    // Run deletion check to capture error logs
    Map<String,NotesDocId> docs =
        notesDocMgrDbTest.getIndexedDocument(null, null, 1);
View Full Code Here

  private NotesDatabaseMock setupSourceDatabase(String server, String filePath,
      String replicaId, List<NotesDocumentMock> docs, String viewName) {
    NotesDatabaseMock srcDb =
        new NotesDatabaseMock(server, filePath, replicaId);
    for (NotesDocumentMock doc : docs) {
      srcDb.addDocument(doc, viewName);
    }
    factory.addDatabase(srcDb);
    return srcDb;
  }
}
View Full Code Here

  }

  public void testGetNextFromCrawlQueue() throws Exception {
    NotesDatabaseMock configDatabase = factory.getDatabase("testconfig.nsf");
    NotesDocumentMock crawlRequestDoc = new NotesDocumentMock();
    configDatabase.addDocument(crawlRequestDoc, NCCONST.VIEWCRAWLQ);

    // Mimic the creation of a crawl request doc in NotesDatabasePoller.
    crawlRequestDoc.addItem(new NotesItemMock("name", NCCONST.NCITM_STATE,
            "type", NotesItem.TEXT, "values", NCCONST.STATENEW));
    crawlRequestDoc.addItem(new NotesItemMock("name", NCCONST.ITM_MIMETYPE,
View Full Code Here

  public void testLoadTemplateDoc() throws Exception {
    NotesDatabaseMock configDatabase = factory.getDatabase("testconfig.nsf");
    configDatabase.setViewFields(NCCONST.VIEWTEMPLATES,
        NCCONST.TITM_TEMPLATENAME);
    NotesDocumentMock template1 = new NotesDocumentMock();
    configDatabase.addDocument(template1, NCCONST.VIEWTEMPLATES);
    template1.addItem(new NotesItemMock("name", NCCONST.TITM_TEMPLATENAME,
            "type", NotesItem.TEXT, "values", "testtemplate1"));
    template1.addItem(new NotesItemMock("name", NCCONST.TITM_METAFIELDS,
            "type", NotesItem.TEXT, "values", "foo", "bar=mappedbar"));
    NotesDocumentMock template2 = new NotesDocumentMock();
View Full Code Here

    template1.addItem(new NotesItemMock("name", NCCONST.TITM_TEMPLATENAME,
            "type", NotesItem.TEXT, "values", "testtemplate1"));
    template1.addItem(new NotesItemMock("name", NCCONST.TITM_METAFIELDS,
            "type", NotesItem.TEXT, "values", "foo", "bar=mappedbar"));
    NotesDocumentMock template2 = new NotesDocumentMock();
    configDatabase.addDocument(template2, NCCONST.VIEWTEMPLATES);
    template2.addItem(new NotesItemMock("name", NCCONST.TITM_TEMPLATENAME,
            "type", NotesItem.TEXT, "values", "testtemplate2"));
    template2.addItem(new NotesItemMock("name", NCCONST.TITM_METAFIELDS,
            "type", NotesItem.TEXT, "values", "foo", "bar=mappedbar"));
    NotesDocumentMock templateResponse = new NotesDocumentMock();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.