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

Single select #69

Merged
merged 3 commits into from
Jan 4, 2017
Merged

Single select #69

merged 3 commits into from
Jan 4, 2017

Conversation

nicopaul
Copy link
Contributor

@nicopaul nicopaul commented Jan 2, 2017

#68 is required, because SingleSelect is based on GenericSelect


This change is Reviewable

@nicopaul nicopaul force-pushed the SingleSelect branch 2 times, most recently from 008309d to 83da705 Compare January 4, 2017 09:53



public class SingleSelectIntegrationTest extends AbstractWebTesterIntegrationTest {
Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Member

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 :)

Copy link
Member

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

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 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

Copy link
Member

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay

@slu-it
Copy link
Member

slu-it commented Jan 4, 2017

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?

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.

3 participants