- Sort Score
- Num 10 results
- Language All
Results 1 - 6 of 6 for resetForTests (0.05 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
android-test/src/androidTest/java/okhttp/android/test/StrictModeTest.kt
} @Test fun testInit() { Platform.resetForTests() applyStrictMode() // Not currently safe // See https://github.com/square/okhttp/pull/8248 OkHttpClient() assertThat(violations).hasSize(1) assertThat(violations[0].message).isEqualTo("newSSLContext") } @Test fun testNewCall() { Platform.resetForTests() val client = OkHttpClient()
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Fri Nov 21 12:33:41 GMT 2025 - 2.2K bytes - Click Count (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/testing/PlatformRule.kt
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 15.4K bytes - Click Count (1) -
android-test/src/test/kotlin/okhttp/android/test/DisabledInitialiserTest.kt
@RunWith(RobolectricTestRunner::class) @Config( sdk = [23, 26, 30, 33, 35], ) class DisabledInitialiserTest { @Before fun setContext() { // Ensure we aren't succeeding because of another test Platform.resetForTests() PlatformRegistry.applicationContext = null } @Test fun testWithoutContext() { val httpUrl = "https://www.google.co.uk".toHttpUrl() assertFailure { httpUrl.topPrivateDomain() }.all {Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Sat Aug 30 16:25:39 GMT 2025 - 2.1K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/platform/Platform.kt
private val logger = Logger.getLogger(OkHttpClient::class.java.name) @JvmStatic fun get(): Platform = platform fun resetForTests(platform: Platform = findPlatform()) { this.platform = platform PublicSuffixDatabase.resetForTests() } fun alpnProtocolNames(protocols: List<Protocol>) = protocols.filter { it != Protocol.HTTP_1_0 }.map { it.toString() }Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Mon Jul 28 07:33:49 GMT 2025 - 8.1K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabase.kt
match = this.substring(mid, mid + publicSuffixLength).string(Charsets.UTF_8) break } } } return match } internal fun resetForTests() { instance = PublicSuffixDatabase(PublicSuffixList.Default) } }
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Mon Jul 28 07:33:49 GMT 2025 - 8.5K bytes - Click Count (0) -
android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt
.build() private val handshakeCertificates = localhost() @StartStop private val server = MockWebServer() @BeforeEach fun setup() { // Needed because of Platform.resetForTests PlatformRegistry.applicationContext = ApplicationProvider.getApplicationContext<Context>() } @Test fun testPlatform() { assertTrue(Platform.isAndroid)
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 29.9K bytes - Click Count (0)