Package com.google.enterprise.connector.manager

Examples of com.google.enterprise.connector.manager.MockManager


  private void doTest(String xmlBody, String expectedResult, String domain,
      String username, String password, Collection<?> groups) {
    LOGGER.info("============== " + getName() + " ====================");
    LOGGER.info("xmlBody:\n" + xmlBody);
    MockManager manager = MockManager.getInstance();
    manager.setShouldVerifyIdentity(true);
    manager.setExpectedIdentity(domain, username, password, groups);
    StringWriter writer = new StringWriter();
    PrintWriter out = new PrintWriter(writer);
    Authenticate.handleDoPost(xmlBody, manager, out);
    out.flush();
    String result = writer.toString();
View Full Code Here


   * #handleDoPost(com.google.enterprise.connector.manager.Manager,
   * java.io.PrintWriter)}
   * where connectorTypes = null.
   */
  public void testNoConnectorTypes() {
    Manager manager = new MockManager() {
        @Override
        public Set<String> getConnectorTypeNames() { return null; }
      };
    String expectedResult =
        "<CmResponse>\n"
View Full Code Here

  private void doTest(String xmlBody, String expectedResult,
      boolean verifyIdentity, String username, String password, String domain) {
    LOGGER.info("Test: " + getName());
    LOGGER.info("xmlBody:\n " + xmlBody);
    MockManager manager = MockManager.getInstance();
    manager.setShouldVerifyIdentity(verifyIdentity);
    if (verifyIdentity) {
      manager.setExpectedIdentity(domain, username, password, null);
    }
    StringWriter writer = new StringWriter();
    PrintWriter out = new PrintWriter(writer);
    AuthorizationHandler authorizationHandler =
        AuthorizationHandler.makeAuthorizationHandlerForTest(xmlBody, manager,
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.manager.MockManager

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.