Skip to content

Conversation

@mattinannt
Copy link
Member

This pull request introduces several changes to enhance the testability and accessibility of methods in the SurveyManager and UserManager classes. The most important changes include making key methods in SurveyManager publicly accessible for testing purposes, adding detailed documentation for these methods, and introducing a test-only getter in UserManager.

Changes to SurveyManager:

  • Made the filterSurveysBasedOnDisplayType method public and annotated it with @JvmStatic to allow external access and testing. Added detailed documentation for the method's parameters and return value.
  • Made the filterSurveysBasedOnRecontactDays method public and annotated it with @JvmStatic. Added documentation to describe the method's purpose and behavior.
  • Introduced a new public invokeShouldDisplayBasedOnPercentage method annotated with @JvmStatic as a test helper for invoking the private shouldDisplayBasedOnPercentage method.
  • Made the getLanguageCode method public and annotated it with @JvmStatic. Added comprehensive documentation to explain its behavior and edge cases.

Changes to UserManager:

  • Changed the setter for lastDisplayedAt from private to internal to allow controlled access within the module.
  • Added a new internal getLastDisplayedAtForTesting method to provide test-only access to the lastDisplayedAt property.

@mattinannt mattinannt merged commit d0a4445 into main May 15, 2025
5 checks passed
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
50.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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.

2 participants