Examples of IParameter


Examples of org.hdiv.state.IParameter

   * Validation test with a noneditable parameter. It should not pass the validation as the received value is not an
   * integer.
   */
  public void testValidateDataIsNotInt() {

    IParameter param1 = new Parameter("param1", "value1", false, null, false);

    IValidationResult result = dataValidator.validate("dataIsNotInt", "simpleAction", "param1", param1, null);
    assertFalse(result.getLegal());
  }
View Full Code Here

Examples of org.hdiv.state.IParameter

   * Validation test with a noneditable parameter. It should not pass the validation as the received parameter doesn't
   * exists.
   */
  public void testValidatePositionDoesNotExist() {

    IParameter param1 = new Parameter("param1", "value1", false, null, false);

    IValidationResult result = dataValidator.validate("1", "simpleAction", "param1", param1, null);
    assertFalse(result.getLegal());
  }
View Full Code Here

Examples of org.hdiv.state.IParameter

  /**
   * Validation test with a noneditable parameter. The validation is correct.
   */
  public void testValidateCorrectData() {

    IParameter param1 = new Parameter("param1", "value1", false, null, false);

    boolean confidentiality = this.getConfig().getConfidentiality();
    String value = (confidentiality) ? "0" : "value1";
    IValidationResult result = dataValidator.validate(value, "simpleAction", "param1", param1, null);

View Full Code Here

Examples of org.hdiv.state.IParameter

  public void testAddSameActionState() {

    IState state = new State(0);
    state.setAction("/action");
    IParameter param = new Parameter("uno", "value", false, null, false);
    state.addParameter(param);

    String id = this.stateScope.addState(state, "token");

    IState state2 = new State(1);
    state2.setAction("/action");
    IParameter param2 = new Parameter("uno", "value", false, null, false);
    state2.addParameter(param2);

    String id2 = this.stateScope.addState(state2, "token");

    assertEquals(id, id2);
View Full Code Here

Examples of org.hdiv.state.IParameter

  public void testAddSameActionState() {

    IState state = new State(0);
    state.setAction("/action");
    IParameter param = new Parameter("uno", "value", false, null, false);
    state.addParameter(param);

    String id = this.stateScope.addState(state, "token");

    IState state2 = new State(1);
    state2.setAction("/action");
    IParameter param2 = new Parameter("uno", "value", false, null, false);
    state2.addParameter(param2);

    String id2 = this.stateScope.addState(state2, "token");

    assertEquals(id, id2);
View Full Code Here

Examples of org.hdiv.state.IParameter

    // Restore state
    IState state = this.stateUtil.restoreState(state2);

    // State contains both parameters
    IParameter param = state.getParameter("parameter1");
    String val = param.getValues().get(0);
    assertEquals("1", val);

    param = state.getParameter("parameter2");
    val = param.getValues().get(0);
    assertEquals("2", val);
  }
View Full Code Here

Examples of org.hdiv.state.IParameter

    IState state = this.stateUtil.restoreState(stateId);

    assertEquals("test.do", state.getAction());

    IParameter param = state.getParameter("parameter1");
    List<String> values = param.getValues();
    assertEquals(1, values.size());
    assertEquals("è-test", values.get(0));// escaped value is the same

    IParameter param2 = state.getParameter("parameterEscaped");
    List<String> values2 = param2.getValues();
    assertEquals(1, values2.size());
    // State stored value is not escaped value, it is the unescaped value
    assertEquals("è-test", values2.get(0));
  }
View Full Code Here

Examples of org.hdiv.state.IParameter

    IState state = this.stateUtil.restoreState(stateId);

    assertEquals("test.do", state.getAction());

    IParameter param = state.getParameter("parameter1");
    List<String> values = param.getValues();
    assertEquals(0, values.size());
  }
View Full Code Here

Examples of org.hdiv.state.IParameter

    // Restore state
    IState state = stateUtil.restoreState(stateValue);
    assertNotNull(state);

    IParameter param = state.getParameter("param");
    List<String> values = param.getValues();
    assertTrue(values.size() == 1);

    String value = values.get(0);
    assertEquals("value", value);
View Full Code Here

Examples of org.jamesii.core.plugins.IParameter

    Map<IParameter, List<ParameterBlock>> usedParameters = new HashMap<>();
    for (SelTreeSetVertex child : children) {
      if (!(child instanceof FactoryVertex<?>)) {
        continue;
      }
      IParameter parameter = ((FactoryVertex<?>) child).getParameter();
      if (usedParameters.containsKey(parameter)) {
        usedParameters.get(parameter).addAll(
            generateFactoryCombinations(child, blackList));
      } else {
        usedParameters.put(parameter,
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.