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"));
}