Package com.google.enterprise.connector.spi

Examples of com.google.enterprise.connector.spi.ConnectorFactory


  }

  /** Tests a basic where clause that returns results. */
  public void testVcWhereClause_results() {
    validMap.put("where_clause", MockDmQuery.TRUE_WHERE_CLAUSE);
    ConnectorFactory connectorFactory = new WhereClauseFactory(false);

    ConfigureResponse response = type.validateConfig(validMap, Locale.US,
        connectorFactory);
    if (response != null)
      fail(response.getMessage());
View Full Code Here


  }

  /** Tests a where clause that returns no results. */
  public void testVcWhereClause_noresults() {
    validMap.put("where_clause", MockDmQuery.FALSE_WHERE_CLAUSE);
    ConnectorFactory connectorFactory = new WhereClauseFactory(false);
    String expected = resources.getString("additionalTooRestrictive");

    ConfigureResponse response = type.validateConfig(validMap, Locale.US,
        connectorFactory);
    assertNotNull(response);
View Full Code Here

  }

  /** Tests that multiple entries are valid. */
  public void testVcWhereClause_list() {
    validMap.put("where_clause", MockDmQuery.TRUE_WHERE_CLAUSE);
    ConnectorFactory connectorFactory =
        new WhereClauseFactory(false, MockDmQuery.TRUE_WHERE_CLAUSE);

    ConfigureResponse response = type.validateConfig(validMap, Locale.US,
        connectorFactory);
    if (response != null)
View Full Code Here

  }

  /** Tests that an XML entry that returns no results leads to an error. */
  public void testVcWhereClause_listnoresults() {
    validMap.put("where_clause", MockDmQuery.TRUE_WHERE_CLAUSE);
    ConnectorFactory connectorFactory =
        new WhereClauseFactory(false, MockDmQuery.FALSE_WHERE_CLAUSE);
    String expected = resources.getString("additionalTooRestrictive");

    ConfigureResponse response = type.validateConfig(validMap, Locale.US,
        connectorFactory);
View Full Code Here

  }

  /** Tests that ignoring a non-empty map entry leads to an error. */
  public void testVcWhereClause_ignoremap() {
    validMap.put("where_clause", MockDmQuery.TRUE_WHERE_CLAUSE);
    ConnectorFactory connectorFactory =
        new WhereClauseFactory(true, MockDmQuery.ALT_TRUE_WHERE_CLAUSE);
    String expected = resources.getString("whereClauseNotUsed");

    ConfigureResponse response = type.validateConfig(validMap, Locale.US,
        connectorFactory);
View Full Code Here

   * Tests that an ignored map entry and an XML entry that returns no
   * results leads to an error. It's not important which error.
   */
  public void testVcWhereClause_ignoremapnoresults() {
    validMap.put("where_clause", MockDmQuery.TRUE_WHERE_CLAUSE);
    ConnectorFactory connectorFactory =
        new WhereClauseFactory(true, MockDmQuery.FALSE_WHERE_CLAUSE);
    List<String> expected = new ArrayList<String>();
    Collections.addAll(expected, resources.getString("whereClauseNotUsed"),
        resources.getString("additionalTooRestrictive"));

View Full Code Here

    assertTrue(response.getMessage(), expected.contains(response.getMessage()));
  }

  /** Tests that an empty map entry can be safely ignored. */
  public void testVcWhereClause_ignoremapempty() {
    ConnectorFactory connectorFactory =
        new WhereClauseFactory(true, MockDmQuery.TRUE_WHERE_CLAUSE);

    ConfigureResponse response = type.validateConfig(validMap, Locale.US,
        connectorFactory);
    if (response != null)
View Full Code Here

  /**
   * Tests that an empty map entry with an XML entry that returns no
   * results leads to an error.
  */
  public void testVcWhereClause_emptynoresults() {
    ConnectorFactory connectorFactory =
        new WhereClauseFactory(true, MockDmQuery.FALSE_WHERE_CLAUSE);
    String expected = resources.getString("additionalTooRestrictive");

    ConfigureResponse response = type.validateConfig(validMap, Locale.US,
        connectorFactory);
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.spi.ConnectorFactory

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.