Skip to content

Conversation

@mike-jg
Copy link
Contributor

@mike-jg mike-jg commented Feb 19, 2019

This adds an assertion to check that a Throwable's cause is identical to an expected cause.

Check List:

  • Fixes N/A
  • Unit tests : YES
  • Javadoc with a code example (API only) : YES

@mike-jg mike-jg force-pushed the feature/assert-cause-same-as branch from e550e3e to af01b6e Compare February 22, 2019 17:17
*/
package org.assertj.core.error;

public class ShouldHaveCauseSameAs extends BasicErrorMessageFactory {
Copy link
Member

Choose a reason for hiding this comment

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

rename to ShouldHaveCauseReference

private static final AssertionInfo INFO = someInfo();

@Test
public void should_pass_if_actual_cause_and_expected_cause_are_the_same_instance() {
Copy link
Member

@joel-costigliola joel-costigliola Mar 2, 2019

Choose a reason for hiding this comment

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

nice test name!

@joel-costigliola
Copy link
Member

@mike-jg thanks, I have commented the PR.

@joel-costigliola joel-costigliola added this to the 3.13 milestone Mar 2, 2019
@mike-jg mike-jg force-pushed the feature/assert-cause-same-as branch from af01b6e to 7048554 Compare March 3, 2019 16:00
@mike-jg mike-jg force-pushed the feature/assert-cause-same-as branch from 7048554 to db8bff1 Compare March 3, 2019 16:05
@mike-jg
Copy link
Contributor Author

mike-jg commented Mar 3, 2019

@joel-costigliola thanks for the review, I've updated the PR accordingly.

@joel-costigliola
Copy link
Member

Integrated thanks @mike-jg for the good work!

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.

2 participants