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

Conversation

@prashant-maroti
Copy link
Contributor

@prashant-maroti prashant-maroti 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
Collaborator

@juherr juherr left a comment

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 Jan 21, 2021
… non primitive data types
@prashant-maroti prashant-maroti force-pushed the prashant-maroti:#2296 branch from f76695b to 94644a5 Jan 21, 2021
@prashant-maroti
Copy link
Contributor Author

@prashant-maroti prashant-maroti 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
@prashant-maroti prashant-maroti requested a review from juherr Jan 21, 2021
@juherr
juherr approved these changes Jan 21, 2021
prashant-maroti and others added 2 commits Jan 25, 2021
Prashant Maroti
@prashant-maroti
Copy link
Contributor Author

@prashant-maroti prashant-maroti commented Jan 25, 2021

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

@krmahadevan krmahadevan merged commit 841ae94 into cbeust:master Jan 26, 2021
3 checks passed
3 checks passed
Java 8 Build
Details
Java 9 Build
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants