Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the assertions tricky feature to the end of the list #348

Merged
merged 1 commit into from
May 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,6 @@ assertTextColorIsNot(R.id.customTextView, R.styleable.SampleCustomView, R.style.
assertRecyclerViewItemCount(R.id.recycler, 10);
```

#### And another tricky feature
```java
assertThatBackButtonClosesTheApp();
```
#### Is this ImageView showing a drawable?
```java
assertHasAnyDrawable(R.id.image_view);
Expand All @@ -345,6 +341,11 @@ assertProgressIsMin(R.id.seek_bar)
assertProgressIsMax(R.id.seek_bar)
```

#### And another tricky feature
```java
assertThatBackButtonClosesTheApp();
```

### Custom assertions

If you have a special case not covered by the given assertions API, we encourage you to assert these special cases with our custom assertions API. It's a convenient way to replace plain `Matcher`s with complex assertions. With Barista, you can match any kind of view by knowing its type and passing its `viewId`, `text`, or a `Matcher<View>`. Once you matched it, you will be able to assert all its properties without adding any complex `Matcher` to your project.
Expand Down