square / assertj-android

A set of AssertJ helpers geared toward testing Android.

Home Page:https://square.github.io/assertj-android/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rename ANDROID.assertThat to ANDROID.assertThatAndroid

mogronalol opened this issue · comments

If I want to use assertj and this library in one class, it would be nice if I could static import everything. So I would have along the lines of:

assertThatAndroid(textView).hasText("foo")
assertThat(someList).containsExactly("one", "two")

I just find it a little more expression that having to write:

ANDROID.assertThat(textView).hasText("foo")
assertThat(someList).containsExactly("one", "two")

Perhaps I'm being a little pedantic, but I'm wondering if this is a good idea or not? If so I can issue a pull request, or if it will be annoying as it will be a breaking change for everyone.

You can static import both.
On Feb 3, 2015 6:09 AM, "Andrew Morgan" notifications@github.com wrote:

If I want to use assertj and this library in one class, it would be nice
if I could static import everything. So I would have along the lines of:

assertThatAndroid(textView).hasText("foo")
assertThat(someList).containsExactly("one", "two")

I just find it a little more expression that having to write:

ANDROID.assertThat(textView).hasText("foo")
assertThat(someList).containsExactly("one", "two")

Perhaps I'm being a little pedantic, but I'm wondering if this is a good
idea or not? If so I can issue a pull request, or if it will be annoying as
it will be a breaking change for everyone.


Reply to this email directly or view it on GitHub
#148.

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.android.api.Assertions.assertThat;

For some reason my ide wasn't letting me do this with alt + enter but a
manual static import is fine. Thanks.

On Tuesday, 3 February 2015, Jake Wharton notifications@github.com wrote:

Closed #148 #148.


Reply to this email directly or view it on GitHub
#148 (comment).