Skip to content

Comparing collection using equals method for assertEquals#2460

Merged
krmahadevan merged 5 commits into
masterfrom
unknown repository
Jan 26, 2021
Merged

Comparing collection using equals method for assertEquals#2460
krmahadevan merged 5 commits into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jan 21, 2021

Copy link
Copy Markdown

Fixes #2296
To check whether the two objects are equal, have replaced all the comparison operator (=) with equals method for non primitive data types. This will add capability to compare the sets as they do not always guarantee the insertion order.

@juherr juherr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please check everywhere actual == expected is used.
Especially https://github.com/cbeust/testng/blame/master/src/main/java/org/testng/Assert.java#L1352

@juherr juherr requested a review from krmahadevan January 21, 2021 12:22
@ghost

ghost commented Jan 21, 2021

Copy link
Copy Markdown
Author

@juherr @krmahadevan Have replaced all the occurrences of comparison operator (=) with 'equals' method for non primitive data types.

Comment thread src/main/java/org/testng/Assert.java Outdated
Comment thread src/test/java/org/testng/AssertTest.java
@ghost ghost requested a review from juherr January 21, 2021 14:06
@ghost

ghost commented Jan 25, 2021

Copy link
Copy Markdown
Author

@krmahadevan Kindly review. Have resolved the conflicts with master.

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.

assertEquals doesn't work for sets

2 participants