Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Generic select #68

Merged
merged 6 commits into from
Jan 4, 2017
Merged

Generic select #68

merged 6 commits into from
Jan 4, 2017

Conversation

nicopaul
Copy link
Contributor

@nicopaul nicopaul commented Jan 2, 2017

This change is Reviewable

This was referenced Jan 2, 2017
@Test
public final void testThatListWithOptionTextsIsReturnedCorrectly_singleSelect() {
List<String> texts = page.singleSelect.getAllOptionTexts();
assertThat(texts.get(0).equals("one"), is(true));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assertThat(texts.get(0).equals("one"), is(true)); >> assertThat(texts.get(0), is("one"));
(for all tests in this class)

@Test
public final void testThatListWithOptionTextsIsReturnedCorrectly_emptySelect() {
List<String> optionTexts = page.emptySelect.getAllOptionTexts();
assertThat(optionTexts.isEmpty(), is(true));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assertThat(optionTexts.isEmpty(), is(true)); >> assertThat(optionTexts, is(empty()));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which import do i have to use?
java.util? But isn't Optional.empty() java8?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

org.hamcrest.Matchers.empty

All Hamcrest matchers have a factory method within the Matchers class.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh just overlooked it
thanks

@Test
public final void testThatListWithOptionValuesIsReturnedCorrectly_emptySelect() {
List<String> optionValues = page.emptySelect.getAllOptionValues();
assertThat(optionValues.isEmpty(), is(true));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above comment

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants