Package br.com.objectos.comuns.sitebricks.form.FormResponseJson

Examples of br.com.objectos.comuns.sitebricks.form.FormResponseJson.FieldErrorJson


    assertThat(res.isValid(), equalTo(false));

    List<FieldErrorJson> errors = res.getErrors();
    assertThat(errors.size(), equalTo(1));

    FieldErrorJson e0 = errors.get(0);
    assertThat(e0.getName(), equalTo("notNull"));
    assertThat(e0.getMessage(), not(equalTo("")));

    String url = res.getRedirectUrl();
    assertThat(url, is(nullValue()));
  }
View Full Code Here


    List<FieldErrorJson> errors = res.getErrors();
    Collections.sort(errors);
    assertThat(errors.size(), equalTo(2));

    FieldErrorJson e0 = errors.get(0);
    assertThat(e0.getName(), equalTo("notNull"));
    assertThat(e0.getMessage(), not(equalTo("")));

    FieldErrorJson e1 = errors.get(1);
    assertThat(e1.getName(), equalTo("positive"));
    assertThat(e1.getMessage(), not(equalTo("")));

    String url = res.getRedirectUrl();
    assertThat(url, is(nullValue()));
  }
View Full Code Here

    assertThat(res.isValid(), equalTo(false));

    List<FieldErrorJson> errors = res.getErrors();
    assertThat(errors.size(), equalTo(1));

    FieldErrorJson e0 = errors.get(0);
    assertThat(e0.getName(), equalTo("fail"));
    assertThat(e0.getMessage(), equalTo("fail!!!"));
  }
View Full Code Here

TOP

Related Classes of br.com.objectos.comuns.sitebricks.form.FormResponseJson.FieldErrorJson

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.