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

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


    assertThat(selectOptions.get(1).getSelected(), is("true"));
  }

  @Test
  public void shouldSelectOneBoolean() throws Exception {
    SelectOneBooleanSelectItemsPage page = this.pages.get(SelectOneBooleanSelectItemsPage.class);
    List<SelectOption> selectOptions = page.getSelectOptions();
    assertThat(selectOptions.size(), is(3));
    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("true"));
    assertThat(selectOptions.get(1).getSelected(), is(nullValue()));
    assertThat(selectOptions.get(1).getText(), is("Yes"));
    assertThat(selectOptions.get(2).getValue(), is("false"));
    assertThat(selectOptions.get(2).getSelected(), is(nullValue()));
    assertThat(selectOptions.get(2).getText(), is("No"));

    page.selectSecondOption();

    page = (SelectOneBooleanSelectItemsPage) page.clickSubmitButton();

    selectOptions = page.getSelectOptions();
    assertThat(selectOptions.size(), is(3));
    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.SelectOneBooleanSelectItemsPage

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.