-
Notifications
You must be signed in to change notification settings - Fork 18
Conversation
@Test | ||
public final void testThatListWithOptionTextsIsReturnedCorrectly_singleSelect() { | ||
List<String> texts = page.singleSelect.getAllOptionTexts(); | ||
assertThat(texts.get(0).equals("one"), is(true)); |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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()));
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above comment
This change is