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

Examples of com.google.enterprise.connector.notes.client.mock.NotesDocumentMock.addItem()


        NotesItem.TEXT, "values", "testserver"));
    crawlDoc.addItem(new NotesItemMock("name", NCCONST.NCITM_REPLICAID, "type",
        NotesItem.TEXT, "values", "replicaid"));
    crawlDoc.addItem(new NotesItemMock("name", NCCONST.NCITM_UNID, "type",
        NotesItem.TEXT, "values", "unid"));
    crawlDoc.addItem(new NotesItemMock("name", NCCONST.NCITM_TEMPLATE, "type",
        NotesItem.TEXT, "values", "Discussion"));

    NotesDocumentMock sourceDoc = new NotesDocumentMock();
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETAFORM, "type",
        NotesItem.TEXT, "values", "Main Topic"));
View Full Code Here


        NotesItem.TEXT, "values", "unid"));
    crawlDoc.addItem(new NotesItemMock("name", NCCONST.NCITM_TEMPLATE, "type",
        NotesItem.TEXT, "values", "Discussion"));

    NotesDocumentMock sourceDoc = new NotesDocumentMock();
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETAFORM, "type",
        NotesItem.TEXT, "values", "Main Topic"));
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_LASTMODIFIED,
        "type", NotesItem.DATETIMES, "values", new Date()));
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETAWRITERNAME,
        "type", NotesItem.TEXT, "values", "Mickey Mouse"));
View Full Code Here

        NotesItem.TEXT, "values", "Discussion"));

    NotesDocumentMock sourceDoc = new NotesDocumentMock();
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETAFORM, "type",
        NotesItem.TEXT, "values", "Main Topic"));
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_LASTMODIFIED,
        "type", NotesItem.DATETIMES, "values", new Date()));
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETAWRITERNAME,
        "type", NotesItem.TEXT, "values", "Mickey Mouse"));
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETALASTUPDATE,
        "type", NotesItem.DATETIMES, "values", new Date()));
View Full Code Here

    NotesDocumentMock sourceDoc = new NotesDocumentMock();
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETAFORM, "type",
        NotesItem.TEXT, "values", "Main Topic"));
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_LASTMODIFIED,
        "type", NotesItem.DATETIMES, "values", new Date()));
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETAWRITERNAME,
        "type", NotesItem.TEXT, "values", "Mickey Mouse"));
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETALASTUPDATE,
        "type", NotesItem.DATETIMES, "values", new Date()));
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETACREATEDATE,
        "type", NotesItem.DATETIMES, "values", new Date()));
View Full Code Here

        NotesItem.TEXT, "values", "Main Topic"));
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_LASTMODIFIED,
        "type", NotesItem.DATETIMES, "values", new Date()));
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETAWRITERNAME,
        "type", NotesItem.TEXT, "values", "Mickey Mouse"));
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETALASTUPDATE,
        "type", NotesItem.DATETIMES, "values", new Date()));
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETACREATEDATE,
        "type", NotesItem.DATETIMES, "values", new Date()));

    crawler.mapFields(crawlDoc, sourceDoc);
View Full Code Here

        "type", NotesItem.DATETIMES, "values", new Date()));
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETAWRITERNAME,
        "type", NotesItem.TEXT, "values", "Mickey Mouse"));
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETALASTUPDATE,
        "type", NotesItem.DATETIMES, "values", new Date()));
    sourceDoc.addItem(new NotesItemMock("name", NCCONST.ITM_GMETACREATEDATE,
        "type", NotesItem.DATETIMES, "values", new Date()));

    crawler.mapFields(crawlDoc, sourceDoc);
    assertNotNull(crawlDoc.getItemValueString(NCCONST.ITM_DISPLAYURL));
  }
View Full Code Here

    mf.add(new NotesCrawlerThread.MetaField("bazform===baz=mappedbaz"));
    crawler.metaFields = mf;

    NotesDocumentMock crawlDoc = new NotesDocumentMock();
    NotesDocumentMock sourceDoc = new NotesDocumentMock();
    sourceDoc.addItem(new NotesItemMock("name", "foo", "type", NotesItem.TEXT,
        "values", "this is the text for field foo"));
    sourceDoc.addItem(new NotesItemMock("name", "bar", "type", NotesItem.TEXT,
        "values", "this is the text for field bar"));
    sourceDoc.addItem(new NotesItemMock("name", "baz", "type", NotesItem.TEXT,
        "values", "this is the text for field baz"));
View Full Code Here

    NotesDocumentMock crawlDoc = new NotesDocumentMock();
    NotesDocumentMock sourceDoc = new NotesDocumentMock();
    sourceDoc.addItem(new NotesItemMock("name", "foo", "type", NotesItem.TEXT,
        "values", "this is the text for field foo"));
    sourceDoc.addItem(new NotesItemMock("name", "bar", "type", NotesItem.TEXT,
        "values", "this is the text for field bar"));
    sourceDoc.addItem(new NotesItemMock("name", "baz", "type", NotesItem.TEXT,
        "values", "this is the text for field baz"));

    crawler.mapMetaFields(crawlDoc, sourceDoc);
View Full Code Here

    NotesDocumentMock sourceDoc = new NotesDocumentMock();
    sourceDoc.addItem(new NotesItemMock("name", "foo", "type", NotesItem.TEXT,
        "values", "this is the text for field foo"));
    sourceDoc.addItem(new NotesItemMock("name", "bar", "type", NotesItem.TEXT,
        "values", "this is the text for field bar"));
    sourceDoc.addItem(new NotesItemMock("name", "baz", "type", NotesItem.TEXT,
        "values", "this is the text for field baz"));

    crawler.mapMetaFields(crawlDoc, sourceDoc);
    assertTrue("crawl doc missing x.foo", crawlDoc.hasItem("x.foo"));
    assertEquals("this is the text for field foo",
View Full Code Here

        crawlDoc.getItemValueString("x.mappedbar"));
    assertFalse("crawl doc has x.mappedbaz", crawlDoc.hasItem("x.mappedbaz"));

    // Add a form name to the doc. Now the metafield mapping with
    // a form qualification should apply.
    sourceDoc.addItem(new NotesItemMock("name", "form", "type", NotesItem.TEXT,
        "values", "bazform"));
    crawlDoc = new NotesDocumentMock();
    crawler.mapMetaFields(crawlDoc, sourceDoc);
    assertTrue("crawl doc missing x.foo", crawlDoc.hasItem("x.foo"));
    assertEquals("this is the text for field foo",
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.