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

Expose ComparisonStrategy::areEqual in AbstractAssert #2633

Merged
merged 1 commit into from May 30, 2022
Merged

Conversation

scordio
Copy link
Member

@scordio scordio commented May 29, 2022

Prerequisite for fixing assertj/assertj-guava#70.

Related to #2631, supersedes #2632.

Copy link
Member

@joel-costigliola joel-costigliola left a comment

just one comment

@scordio scordio force-pushed the expose_are-equal branch 2 times, most recently from 96674b4 to c9acd82 Compare May 30, 2022
@scordio scordio requested a review from joel-costigliola May 30, 2022
// GIVEN
Method areEqual = underTest.getClass().getDeclaredMethod("areEqual", Object.class, Object.class);
// WHEN
boolean isProtected = Modifier.isProtected(areEqual.getModifiers());
// THEN
then(isProtected).isTrue();
Copy link
Member Author

@scordio scordio May 30, 2022

Choose a reason for hiding this comment

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

assertThat(underTest.getClass())
  .getDeclaredMethod("areEqual", Object.class, Object.class)
  .isProtected();

How much nicer would it be? 🙂

@scordio scordio merged commit c592c18 into main May 30, 2022
16 of 17 checks passed
@scordio scordio deleted the expose_are-equal branch May 30, 2022
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.

None yet

2 participants