Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 22 for robolectric (0.07 seconds)

  1. okhttp/src/androidHostTest/resources/okhttp3/robolectric.properties

    # Robolectric on API 36 requires JDK 21
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Feb 04 20:45:04 GMT 2026
    - 47 bytes
    - Click Count (0)
  2. android-test/src/test/kotlin/okhttp/android/test/NonRobolectricOkHttpClientTest.kt

          cause().isNotNull().all {
            hasMessage(
              "Platform applicationContext not initialized. " +
                "Possibly running Android unit test without Robolectric. " +
                "Android tests should run with Robolectric " +
                "and call OkHttp.initialize before test",
            )
            hasClass<IOException>()
          }
        }
      }
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Mon Jul 28 07:33:49 GMT 2025
    - 1.6K bytes
    - Click Count (0)
  3. android-test/src/test/kotlin/okhttp/android/test/RobolectricOkHttpClientTest.kt

    import org.junit.Before
    import org.junit.runner.RunWith
    import org.robolectric.RobolectricTestRunner
    import org.robolectric.annotation.Config
    
    @RunWith(RobolectricTestRunner::class)
    @Config(
      sdk = [23, 26, 30, 33, 35],
    )
    class RobolectricOkHttpClientTest : BaseOkHttpClientUnitTest() {
      @Before
      fun setContext() {
        // This is awkward because Robolectric won't run our initializers and we don't want test deps
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sat Aug 30 16:25:39 GMT 2025
    - 1.2K bytes
    - Click Count (0)
  4. okhttp/src/androidMain/kotlin/okhttp3/internal/platform/PlatformRegistry.kt

            ?: AndroidPlatform.buildIfSupported()
        if (androidPlatform != null) return androidPlatform
    
        // If the API version is 0, assume this is the Android artifact, but running on the JVM without Robolectric.
        if (Build.VERSION.SDK_INT == 0) {
          return Jdk9Platform.buildIfSupported()
            ?: Platform()
        }
    
        throw IllegalStateException("Expected Android API level 21+ but was ${Build.VERSION.SDK_INT}")
      }
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Mon Jul 28 07:33:49 GMT 2025
    - 1.6K bytes
    - Click Count (0)
  5. okhttp/src/androidMain/kotlin/okhttp3/internal/publicsuffix/AssetPublicSuffixList.kt

          if (Build.FINGERPRINT == null) {
            throw IOException(
              "Platform applicationContext not initialized. " +
                "Possibly running Android unit test without Robolectric. " +
                "Android tests should run with Robolectric " +
                "and call OkHttp.initialize before test",
            )
          } else {
            throw IOException(
              "Platform applicationContext not initialized. " +
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Mon Jul 28 07:33:49 GMT 2025
    - 1.7K bytes
    - Click Count (0)
  6. okhttp/src/androidMain/kotlin/okhttp3/internal/platform/android/AndroidLog.kt

        } catch (re: RuntimeException) {
          // Happens with non-robolectric unit tests
          System.err.println("Possibly running android unit test without robolectric")
          re.printStackTrace()
        } catch (ule: UnsatisfiedLinkError) {
          // Happens with Paparazzi - with Android classes on the classpath
          System.err.println("Possibly running android unit test without robolectric")
          ule.printStackTrace()
        }
      }
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sat Oct 25 11:16:17 GMT 2025
    - 4.3K bytes
    - Click Count (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/platform/Jdk9Platform.kt

    import javax.net.ssl.X509TrustManager
    import okhttp3.Protocol
    import okhttp3.internal.SuppressSignatureCheck
    
    /**
     * OpenJDK 9+ and JDK8 build 252+.
     *
     * This may also be used for Android tests with Robolectric.
     */
    @Suppress("NewApi")
    open class Jdk9Platform : Platform() {
      @SuppressSignatureCheck
      override fun configureTlsExtensions(
        sslSocket: SSLSocket,
        hostname: String?,
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Feb 03 22:17:59 GMT 2026
    - 3.6K bytes
    - Click Count (0)
  8. okhttp/okhttp3.pro

    -dontwarn org.codehaus.mojo.animal_sniffer.*
    
    # OkHttp platform used only on JVM and when Conscrypt and other security providers are available.
    # May be used with robolectric or deliberate use of Bouncy Castle on Android
    -dontwarn okhttp3.internal.platform.**
    -dontwarn org.conscrypt.**
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sat Jul 19 13:25:00 GMT 2025
    - 512 bytes
    - Click Count (0)
  9. okhttp/src/androidMain/kotlin/okhttp3/OkHttp.android.kt

    actual object OkHttp {
      @JvmField
      actual val VERSION: String = CONST_VERSION
    
      /**
       * Configure the ApplicationContext. Not needed unless the AndroidX Startup [Initializer] is disabled, or running
       * a robolectric test.
       *
       * The functionality that will fail without a valid Context is primarily Cookies and URL Domain handling, but
       * may expand in the future.
       */
      fun initialize(applicationContext: Context) {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Mon Jul 28 07:33:49 GMT 2025
    - 1.3K bytes
    - Click Count (0)
  10. okhttp/build.gradle.kts

        }
    
        withDeviceTest {
          instrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
          execution = "HOST"
        }
    
        // SDK 35 needs 17, for now avoid trying to run on
        // multiple robolectric versions, since device tests
        // do that
        if (testJavaVersion >= 17) {
          withHostTest {
            isIncludeAndroidResources = true
          }
        }
      }
    
      sourceSets {
        val commonJvmAndroid =
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Feb 04 22:16:39 GMT 2026
    - 11.4K bytes
    - Click Count (0)
Back to Top