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

Examples of org.springframework.springfaces.traveladvisor.integrationtest.page.selectitems.SelectOneJpaSelectItemsPage


  @Rule
  public Pages pages = new ShowcasePages();

  @Test
  public void shouldSelectOneJpa() throws Exception {
    SelectOneJpaSelectItemsPage page = this.pages.get(SelectOneJpaSelectItemsPage.class);
    List<SelectOption> selectOptions = page.getSelectOptions();
    assertThat(selectOptions.size(), is(28));
    assertThat(selectOptions.get(0).getValue(), is(""));
    assertThat(selectOptions.get(0).getSelected(), is("true"));
    assertThat(selectOptions.get(0).getText(), is("--- Please Select ---"));
    assertThat(selectOptions.get(1).getValue(), is("0"));
    assertThat(selectOptions.get(1).getSelected(), is(nullValue()));
    assertThat(selectOptions.get(1).getText(), is("Rod Johnson"));

    page.selectSecondOption();

    page = (SelectOneJpaSelectItemsPage) page.clickSubmitButton();

    selectOptions = page.getSelectOptions();
    assertThat(selectOptions.size(), is(28));
    assertThat(selectOptions.get(0).getSelected(), is(nullValue()));
    assertThat(selectOptions.get(1).getSelected(), is("true"));
  }
View Full Code Here

TOP

Related Classes of org.springframework.springfaces.traveladvisor.integrationtest.page.selectitems.SelectOneJpaSelectItemsPage

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.