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

Choose a reason for hiding this comment

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

just one comment

@scordio scordio force-pushed the expose_are-equal branch 2 times, most recently from 96674b4 to c9acd82 Compare May 30, 2022 21:28
Comment on lines +52 to +56
// 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

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
@scordio scordio deleted the expose_are-equal branch May 30, 2022 22:27
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