-
-
Notifications
You must be signed in to change notification settings - Fork 765
Add 'hasCauseSameAs' assertion for Throwables #1443
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
Conversation
e550e3e to
af01b6e
Compare
src/main/java/org/assertj/core/api/AbstractThrowableAssert.java
Outdated
Show resolved
Hide resolved
src/main/java/org/assertj/core/api/AbstractThrowableAssert.java
Outdated
Show resolved
Hide resolved
src/main/java/org/assertj/core/api/AbstractThrowableAssert.java
Outdated
Show resolved
Hide resolved
src/main/java/org/assertj/core/api/AbstractThrowableAssert.java
Outdated
Show resolved
Hide resolved
src/main/java/org/assertj/core/error/ShouldHaveCauseSameAs.java
Outdated
Show resolved
Hide resolved
| */ | ||
| package org.assertj.core.error; | ||
|
|
||
| public class ShouldHaveCauseSameAs extends BasicErrorMessageFactory { |
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.
rename to ShouldHaveCauseReference
src/test/java/org/assertj/core/api/throwable/ThrowableAssert_hasCauseSameAs_Test.java
Outdated
Show resolved
Hide resolved
src/test/java/org/assertj/core/api/throwable/ThrowableAssert_hasCauseSameAs_Test.java
Outdated
Show resolved
Hide resolved
| private static final AssertionInfo INFO = someInfo(); | ||
|
|
||
| @Test | ||
| public void should_pass_if_actual_cause_and_expected_cause_are_the_same_instance() { |
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.
nice test name!
src/test/java/org/assertj/core/internal/throwables/Throwables_assertHasCauseSameAs_Test.java
Outdated
Show resolved
Hide resolved
|
@mike-jg thanks, I have commented the PR. |
af01b6e to
7048554
Compare
7048554 to
db8bff1
Compare
|
@joel-costigliola thanks for the review, I've updated the PR accordingly. |
|
Integrated thanks @mike-jg for the good work! |
This adds an assertion to check that a
Throwable's cause is identical to an expected cause.Check List: