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

Add assertNoError method side of assertError methods #385

Merged
merged 7 commits into from
Mar 10, 2021
Merged

Conversation

alorma
Copy link
Member

@alorma alorma commented Mar 9, 2021

When playing with errors... we have a method to check for assertError , error is displayed...

But, we didn't had a method to check for error is not shown...

@alorma alorma requested review from a team, rocboronat and Sloy March 9, 2021 14:21
@alorma alorma force-pushed the no_Error branch 2 times, most recently from 59c75d7 to 30dd9e2 Compare March 9, 2021 15:01
README.md Outdated Show resolved Hide resolved
@rocboronat
Copy link
Member

Heeey! Just wondering if assertError was a good name.

Maybe today I would name it assertErrorDisplayed, so your new method could be assertErrorNotDisplayed.

If you agree it, name your new method assertErrorNotDisplayed, and we could do the rest of the change in a new PR.

Thanks for the PR, Bernat! :-)

rocboronat
rocboronat previously approved these changes Mar 9, 2021
@alorma
Copy link
Member Author

alorma commented Mar 9, 2021

@rocboronat renamed methods!

@rocboronat
Copy link
Member

Yey! Everything is perfect now but... there's always a but... if we merge this PR, we will break the API we offer right now.

We should mark the old assertError methods as deprecated and forward them internally to the new ones. We can't delete them without leaving them there for some versions. Our users will hate us if we do it. And we are lovely! 😄

@alorma alorma merged commit 59c899f into master Mar 10, 2021
@alorma alorma deleted the no_Error branch March 10, 2021 08:39
import com.schibsted.spain.barista.internal.assertAny
import org.hamcrest.Description
import org.hamcrest.Matcher
import org.hamcrest.TypeSafeMatcher

object BaristaErrorAssertions {

@Deprecated(
Copy link
Member

Choose a reason for hiding this comment

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

👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants