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

Comparing collection using equals method for assertEquals #2460

Merged
merged 5 commits into from Jan 26, 2021
Merged

Comparing collection using equals method for assertEquals #2460

merged 5 commits into from Jan 26, 2021

Conversation

ghost
Copy link

@ghost ghost commented Jan 21, 2021

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.

Copy link
Member

@juherr juherr left a comment

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

@ghost
Copy link
Author

ghost commented Jan 21, 2021

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

src/main/java/org/testng/Assert.java Outdated Show resolved Hide resolved
src/test/java/org/testng/AssertTest.java Show resolved Hide resolved
@ghost ghost requested a review from juherr January 21, 2021 14:06
@ghost
Copy link
Author

ghost commented Jan 25, 2021

@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