Package com.google.enterprise.connector.ldap.MockLdapHandlers

Examples of com.google.enterprise.connector.ldap.MockLdapHandlers.SimpleMockLdapHandler


import java.net.URLEncoder;

public class LdapJsonDocumentFetcherTest extends JsonDocumentFetcherTestCase {
  @Override
  public JsonDocumentFetcher setJsonDocumentFetcher() {
    SimpleMockLdapHandler basicMock = MockLdapHandlers.getBasicMock();
    return new LdapJsonDocumentFetcher(basicMock);
  }
View Full Code Here


public class LdapConnectorTypeTest extends TestCase {

  public void testInstantiate() {
    // just attempts to instantiate an LCT - can only fail
    // if an exception is thrown
    SimpleMockLdapHandler basicMock = MockLdapHandlers.getBasicMock();
    LdapConnectorType lct = new LdapConnectorType(basicMock);
  }
View Full Code Here

    SimpleMockLdapHandler basicMock = MockLdapHandlers.getBasicMock();
    LdapConnectorType lct = new LdapConnectorType(basicMock);
  }

  public void testGetConfigForm() throws Exception {
    SimpleMockLdapHandler basicMock = MockLdapHandlers.getBasicMock();
    LdapConnectorType lct = new LdapConnectorType(basicMock);
    ResourceBundle b = lct.getResourceBundle(Locale.US);
    ConfigureResponse cr = lct.getConfigForm(Locale.US);

    String message = cr.getMessage();
View Full Code Here

   * and return a new form populated with that schema; second, after the user
   * has checked off some of the schema elements. This test looks at the first
   * case.
   */
  public void testValidateConfigGetSchema() throws Exception {
    SimpleMockLdapHandler basicMock = MockLdapHandlers.getBasicMock();
    LdapConnectorType lct = new LdapConnectorType(basicMock);
    ResourceBundle b = lct.getResourceBundle(Locale.US);
    ImmutableMap<String, String> originalConfig =
        ImmutableMap.<String, String>builder()
            .put("authtype", "ANONYMOUS")
View Full Code Here

    List<String> lines = findMatchingLines(formSnippet, "schema");
    assertTrue(lines.toString(), 2 < lines.size());
  }

  public void testValidateConfigGetSchemaSimpleAuth() throws Exception {
    SimpleMockLdapHandler basicMock = MockLdapHandlers.getBasicMock();
    LdapConnectorType lct = new LdapConnectorType(basicMock);
    ResourceBundle b = lct.getResourceBundle(Locale.US);
    ImmutableMap<String, String> originalConfig =
        ImmutableMap.<String, String>builder()
            .put("authtype", "SIMPLE")
View Full Code Here

  /*
   * This test looks for the second scenario (second press of "save" button).
   * This should be an acceptable config.
   */
  public void testValidateConfigWithSchema() {
    SimpleMockLdapHandler basicMock = MockLdapHandlers.getBasicMock();
    LdapConnectorType lct = new LdapConnectorType(basicMock);
    ImmutableMap<String, String> originalConfig =
        ImmutableMap.<String, String>builder()
            .put("port", "")
            .put("authtype", "ANONYMOUS")
View Full Code Here

    assertEquals(0, selectedSchemaKeys.size());
    // we should have seen a key for each pseudo-key
  }

  public void testGetPopulatedConfigForm() throws Exception {
    SimpleMockLdapHandler basicMock = MockLdapHandlers.getBasicMock();
    LdapConnectorType lct = new LdapConnectorType(basicMock);
    ResourceBundle b = lct.getResourceBundle(Locale.US);

    ImmutableMap<String, String> originalConfig = ImmutableMap.<String, String> builder().put("googlePropertiesVersion", "3").put("authtype", "ANONYMOUS").put("hostname", "ldap.realistic-looking-domain.com").put("googleConnectorName", "x").put("googleConnectorWorkDir", "/home/ziff/cats/ldap-tom/webapps/connector-manager/WEB-INF/connectors/ldapConnector/x").put("password", "test").put("schema_10", "dn").put("username", "admin").put("schema_9", "employeestatus").put("schema_8", "employeenumber").put("method", "STANDARD").put("basedn", "ou=people,dc=example,dc=com").put("googleWorkDir", "/home/ziff/cats/ldap-tom/webapps/connector-manager/WEB-INF").put("filter", "ou=people").build();
View Full Code Here

    assertTrue(0 < lines.size());
    return lines.get(0);
  }

  public void testDefaultDnAttributeSelected() throws Exception {
    SimpleMockLdapHandler basicMock = MockLdapHandlers.getBasicMock();
    LdapConnectorType lct = new LdapConnectorType(basicMock);
    ResourceBundle b = lct.getResourceBundle(Locale.US);
    ImmutableMap<String, String> originalConfig =
        ImmutableMap.<String, String>builder()
            .put("authtype", "SIMPLE")
View Full Code Here

public class LdapConnectorTypeHtmlunitTest extends TestCase {

  public void testLdapConnectorHtmlPageDeleteAttribute() throws FailingHttpStatusCodeException,
      MalformedURLException, IOException {

    SimpleMockLdapHandler basicMock = MockLdapHandlers.getBasicMock();
    LdapConnectorType lct = new LdapConnectorType(basicMock);
    ResourceBundle b = lct.getResourceBundle(Locale.US);

    ImmutableMap<String, String> Config =
        ImmutableMap.<String, String>builder().put("googlePropertiesVersion", "3")
View Full Code Here

  }

  public void testLdapConnectorHtmlPageDeleteDn() throws FailingHttpStatusCodeException,
      MalformedURLException, IOException {

    SimpleMockLdapHandler basicMock = MockLdapHandlers.getBasicMock();
    LdapConnectorType lct = new LdapConnectorType(basicMock);
    ResourceBundle b = lct.getResourceBundle(Locale.US);

    ImmutableMap<String, String> Config =
        ImmutableMap.<String, String>builder().put("googlePropertiesVersion", "3")
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.ldap.MockLdapHandlers.SimpleMockLdapHandler

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.