Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for PlatformVersion (0.14 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/testing/PlatformVersion.kt

     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.testing
    
    object PlatformVersion {
      val majorVersion: Int by lazy {
        when (val jvmSpecVersion = getJvmSpecVersion()) {
          "1.8" -> 8
          else -> jvmSpecVersion.toInt()
        }
      }
    
      fun getJvmSpecVersion(): String {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Dec 20 23:27:07 UTC 2023
    - 917 bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/JSSETest.kt

        val response = client.newCall(request).execute()
    
        response.use {
          assertEquals(200, response.code)
          if (PlatformVersion.majorVersion > 11) {
            assertEquals(TlsVersion.TLS_1_3, response.handshake?.tlsVersion)
          }
          if (PlatformVersion.majorVersion > 8) {
            assertEquals(Protocol.HTTP_2, response.protocol)
          }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  3. samples/compare/src/test/kotlin/okhttp3/compare/JavaHttpClientTest.kt

    import java.net.http.HttpRequest
    import java.net.http.HttpResponse.BodyHandlers
    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import okhttp3.testing.PlatformRule
    import okhttp3.testing.PlatformVersion
    import org.junit.jupiter.api.Test
    import org.junit.jupiter.api.extension.RegisterExtension
    
    /**
     * Java HTTP Client.
     *
     * https://openjdk.java.net/groups/net/httpclient/intro.html
     *
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/test/kotlin/okhttp3/testing/PlatformRuleTest.kt

      }
    
      @Test
      fun testGreenCase() {
      }
    
      @Test
      fun testGreenCaseFailingOnLater() {
        platform.expectFailureFromJdkVersion(PlatformVersion.majorVersion + 1)
      }
    
      @Test
      fun failureCase() {
        platform.expectFailureFromJdkVersion(PlatformVersion.majorVersion)
    
        check(false)
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 14:55:09 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/SessionReuseTest.kt

    import javax.net.ssl.SSLSocket
    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import okhttp3.testing.Flaky
    import okhttp3.testing.PlatformRule
    import okhttp3.testing.PlatformVersion
    import okio.ByteString.Companion.toByteString
    import org.junit.jupiter.api.Assertions.assertEquals
    import org.junit.jupiter.api.Assertions.assertNotEquals
    import org.junit.jupiter.api.Assumptions.assumeTrue
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 6K bytes
    - Viewed (0)
Back to top