-
-
Notifications
You must be signed in to change notification settings - Fork 773
Closed
Copy link
Labels
status: ideal for contributionAn issue that a contributor can help us withAn issue that a contributor can help us with
Milestone
Description
Summary
I sugest to add doesNotHaveSameHashCodeAs and doesNotHaveToString assertions to reflect isEqualTo/isNotEqualTo. (With a shorter name maybe?)
Example
assertThat(foo).isEqualTo(foo);
assertThat(foo).hasSameHashCodeAs(foo);
assertThat(foo).hasToString(foo.toString());
// Would replace:
assertThat(foo).isNotEqualTo(bar);
assertThat(foo.hashCode()).isNotEqualTo(bar.hashCode());
assertThat(foo.toString()).isNotEqualTo(bar.toString());
// By:
assertThat(foo).isNotEqualTo(bar);
assertThat(foo).doesNotHaveSameHashCodeAs(bar);
assertThat(foo).doesNotHaveToString(bar.toString());Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: ideal for contributionAn issue that a contributor can help us withAn issue that a contributor can help us with