Package org.springframework.springfaces.traveladvisor.integrationtest.page.validator

Examples of org.springframework.springfaces.traveladvisor.integrationtest.page.validator.AbstractValidatorPageObject


  @Rule
  public Pages pages = new ShowcasePages();

  @Test
  public void shouldFailFromSpringValidator() throws Exception {
    AbstractValidatorPageObject page = pages.get(SpringBeanValidatorPage.class);
    page.setInputText("1");
    page = page.clickSubmitButton();
    assertThat(page.hasError(), is(true));
    assertThat(page.getErrorMessage(), is("Value must be 20 or more"));
  }
View Full Code Here


    assertThat(page.getErrorMessage(), is("Value must be 20 or more"));
  }

  @Test
  public void shouldPassFromSpringValidator() throws Exception {
    AbstractValidatorPageObject page = pages.get(SpringBeanValidatorPage.class);
    page.setInputText("20");
    page = page.clickSubmitButton();
    assertThat(page.hasError(), is(false));
  }
View Full Code Here

    assertThat(page.hasError(), is(false));
  }

  @Test
  public void shouldFailFromGenericSpringValidator() throws Exception {
    AbstractValidatorPageObject page = pages.get(GenericSpringBeanValidatorPage.class);
    page.setInputText("1");
    page = page.clickSubmitButton();
    assertThat(page.hasError(), is(true));
    assertThat(page.getErrorMessage(), is("Value must be 10 or more"));
  }
View Full Code Here

    assertThat(page.getErrorMessage(), is("Value must be 10 or more"));
  }

  @Test
  public void shouldPassFromGenericSpringValidator() throws Exception {
    AbstractValidatorPageObject page = pages.get(GenericSpringBeanValidatorPage.class);
    page.setInputText("10");
    page = page.clickSubmitButton();
    assertThat(page.hasError(), is(false));
  }
View Full Code Here

    assertThat(page.hasError(), is(false));
  }

  @Test
  public void shouldFailFromForClassValidator() throws Exception {
    AbstractValidatorPageObject page = pages.get(SpringBeanValidatorForClassPage.class);
    page.setInputText("1");
    page = page.clickSubmitButton();
    assertThat(page.hasError(), is(true));
    assertThat(page.getErrorMessage(), is("Value must be 30 or more"));
  }
View Full Code Here

    assertThat(page.getErrorMessage(), is("Value must be 30 or more"));
  }

  @Test
  public void shouldPassFromForClassValidator() throws Exception {
    AbstractValidatorPageObject page = pages.get(SpringBeanValidatorForClassPage.class);
    page.setInputText("30");
    page = page.clickSubmitButton();
    assertThat(page.hasError(), is(false));
  }
View Full Code Here

TOP

Related Classes of org.springframework.springfaces.traveladvisor.integrationtest.page.validator.AbstractValidatorPageObject

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.