Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-land: Convert RootViewTest to Kotlin (#37250)
Summary: Pull Request resolved: #37250 This is a re-land of a previous commit which ended up in us losing the history of the Java file. This new PR should not be doing so. This is a reference PR on how to convert a JVM Unit test from Java to Kotlin. A couple of things to keep in mind when converting: 1. Do not use hungarian notation (`mActivity` -> `activity`) 2. JUnit rules need to be annotated with `get:Rule` rather than just `Rule`. 3. Use `import org.powermock.api.mockito.PowerMockito.`when` as whenever`to avoid having to escape all the `when` function invocation in the code as it's a keyword. 4. Do static imports of all the Mockito/PowerMock functions. Getting rid of PowerMock and using Fakes is a plus, but that's not always possible. Having the test running and be green is already a good result. Changelog: [Internal] [Changed] - Convert RootViewTest to Kotlin Reviewed By: cipolleschi Differential Revision: D45565375 fbshipit-source-id: 6c01d037e04dc1ec0003263177d86079a6f19a04
- Loading branch information