-
Notifications
You must be signed in to change notification settings - Fork 18
Conversation
008309d
to
83da705
Compare
|
||
|
||
|
||
public class SingleSelectIntegrationTest extends AbstractWebTesterIntegrationTest { |
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.
There are a number of assertThat(someting.equals(somethingElse), is(true));
assertions in this test 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.
Can not change assertions for testThatSelectedTextIsEmpty_emptySelect()
(line 108), and testThatSelectedValueIsEmpty_emptySelect()
(line 128)
from assertThat(someString.isEmpty(), is(true));
to assertThat(someString, is(empty()));
And can not change assertion for testThatIndexIsNull_emptySelect()
(line 148)
from assertThat(index.equals(null), is(true));
to assertThat(index, is(null));
, because null is ambigious.
Do you know why? Is it because someString
is a String and not a List?
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.
Yes, it's because its a String, not a List.
For Strings it would be something like this:
assertThat("someString", Matchers.isEmptyString());
S**t like this is, why we changed to AssertJ in WebTester 2 :)
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.
and for null values, there is a Matchers.nullValue()
matcher
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 okay, but even matchers.isEmptyString()
does not work, because the String is null and not empty. But if i test it with nullValue()
there is an exception too.
I found the Matchers.nullValue()
before, but both versions does not work with the code either
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.
hm... in that case leave these particular assertions as they are now (working)
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.
Okay
hm.. github isn't allowing me to rebase & merge - and it doesn't say why .. could you rebase this PR and #70 onto the current master? |
#68 is required, because
SingleSelect
is based onGenericSelect
This change is