Package com.google.enterprise.connector.util.connectortype.ConnectorFields

Examples of com.google.enterprise.connector.util.connectortype.ConnectorFields.IntField


  private void doTestIntField(int value) throws Exception {
    String name = "intfield";
    boolean mandatory = false;
    int defaultInt = 47;
    IntField field = new IntField(name, mandatory, defaultInt);
    field.setValueFromInt(value);
    boolean highlightError = false;
    String snippet = field.getSnippet(new UpcasingResourceBundle(), highlightError);
    XmlParseUtil.validateXhtml(snippet);
    assertTrue(snippet.contains("name=\"" + name + "\""));
    assertTrue(snippet.contains("input"));
    assertTrue(snippet.contains("type=\"text\""));
    assertTrue(snippet.contains("value=\"" + value + "\""));
    assertEquals(value, field.getIntegerValue().intValue());
    assertTrue(snippet.contains(name.toUpperCase()));
    assertTrue(snippet.contains(name));
  }
View Full Code Here


    /** Sets field values from config that came from HTML form. */
    FormManager(Map<String, String> configMap, ResourceBundle bundle) {
      this.config = Maps.newHashMap(configMap);
      hostField =
          new SingleLineField(ConfigName.HOSTNAME.toString(), true, false);
      portField = new IntField(ConfigName.PORT.toString(), false, 389);
      authTypeField =
          new EnumField<AuthType>(ConfigName.AUTHTYPE.toString(), true,
          AuthType.class,
          AuthType.ANONYMOUS);
      userField =
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.util.connectortype.ConnectorFields.IntField

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.