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

4671: Change the deprecated RuntimeEnvironment.application in all the Robolectric unit tests #5140

Conversation

RitikaPahwa4444
Copy link
Collaborator

Description (required)

Fixes #4671

What changes did you make and why?

Changed the deprecated RuntimeEnvironment.application to ApplicationProvider.getApplicationContext() in all the robolectric unit tests and optimised the imports accordingly.

Tests performed (required)

Tested BetaDebug on Redmi 5A with API level 26.

…ent.application to ApplicationProvider and optimise imports
Copy link
Member

@nicolas-raoul nicolas-raoul left a comment

Choose a reason for hiding this comment

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

Is tis change necessary: app/CommonsContributions/551b5101-d2e1-49db-882e-df07f132950b15998328188345850540.jpg ?

Copy link
Member

@nicolas-raoul nicolas-raoul left a comment

Choose a reason for hiding this comment

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

Tested, everything seems to be working normally 🙂

@RitikaPahwa4444
Copy link
Collaborator Author

Is tis change necessary: app/CommonsContributions/551b5101-d2e1-49db-882e-df07f132950b15998328188345850540.jpg ?

Still wondering how this got generated as I had not created any folders. I'll remove it. Thank you for reviewing and letting me know :)

Removed unnecessary directory created in the process
Copy link
Member

@nicolas-raoul nicolas-raoul left a comment

Choose a reason for hiding this comment

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

Unit tests running fine

@nicolas-raoul nicolas-raoul merged commit 1bc21c2 into commons-app:master Feb 6, 2023
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.

Robolectric 'application: Application!' is deprecated. Deprecated in Java
2 participants