Visible Only For Tests
Visible Only For Tests
With the @VisibleForTesting
annotation you can specify an otherwise=
attribute which specifies the intended visibility if the method had not been made more widely visible for the tests.
This check looks for accesses from production code (e.g. not tests) where the access would not have been allowed with the intended production visibility.
Issue id: VisibleForTests
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for Android 2023.3, Qodana for JVM 2023.3 |
Plugin: | Android, 2022.3.1 Beta 2 |
Last modified: 13 July 2023