Skip to content

Conversation

@Akshaykomar890
Copy link
Contributor

Description

Fix :- Refactor Nearby Location Tests to Improve Assertion Logic

What changes did I make ?

-Refactored testSearchCloseToCurrentLocationWhenFar: Simplified assertion by using assertFalse(!isClose) for better readability and logical clarity.

-Added testSearchCloseToCurrentLocationWhenClose: Created a new test case to validate behavior when the search is close to the current location, ensuring assertTrue(isClose) for correctness.

-Improved Coverage: These changes enhance the test coverage and reliability of the searchCloseToCurrentLocation function.

-Refactored testSearchCloseToCurrentLocationWhenFar: Simplified assertion by using assertFalse(!isClose) for better readability and logical clarity.

-Added testSearchCloseToCurrentLocationWhenClose: Created a new test case to validate behavior when the search is close to the current location, ensuring assertTrue(isClose) for correctness.

-Improved Coverage: These changes enhance the test coverage and reliability of the searchCloseToCurrentLocation function.
Copy link
Contributor

@Sujal-Gupta-SG Sujal-Gupta-SG left a comment

Choose a reason for hiding this comment

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

Review by GSoC applicant

The changes seem great as they improve readability and logical clarity in the assertions without affecting the functionality.

@nicolas-raoul nicolas-raoul merged commit 25e467b into commons-app:main Jan 5, 2025
@Akshaykomar890
Copy link
Contributor Author

Thank you, @nicolas-raoul , for reviewing and merging my changes🙌

@Akshaykomar890 Akshaykomar890 deleted the refactor/nearby-location-test-assertions branch January 5, 2025 18:01
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.

4 participants