- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for getApplicationContext (0.06 sec)
-
android-test/src/test/kotlin/okhttp/android/test/RobolectricOkHttpClientTest.kt
fun setContext() { // This is awkward because Robolectric won't run our initializers and we don't want test deps // https://github.com/robolectric/robolectric/issues/8461 OkHttp.initialize(ApplicationProvider.getApplicationContext()) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 16:25:39 UTC 2025 - 1.2K bytes - Viewed (0) -
okhttp/src/androidUnitTest/kotlin/okhttp3/internal/publicsuffix/PublicSuffixTesting.android.kt
import org.robolectric.RobolectricTestRunner actual typealias PublicSuffixTestRunner = RobolectricTestRunner actual fun beforePublicSuffixTest() { PlatformRegistry.applicationContext = ApplicationProvider.getApplicationContext()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 08:21:20 UTC 2025 - 974 bytes - Viewed (0) -
android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt
@StartStop private val server = MockWebServer() @BeforeEach fun setup() { // Needed because of Platform.resetForTests PlatformRegistry.applicationContext = ApplicationProvider.getApplicationContext<Context>() } @Test fun testPlatform() { assertTrue(Platform.isAndroid) if (Build.VERSION.SDK_INT >= 29) { assertTrue(Platform.get() is Android10Platform) } else {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 02 14:12:28 UTC 2025 - 29K bytes - Viewed (0)