Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 30 for assertEquals (0.18 sec)

  1. okhttp-tls/src/test/java/okhttp3/tls/CertificatesTest.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.tls
    
    import org.junit.jupiter.api.Assertions.assertEquals
    import org.junit.jupiter.api.Test
    
    class CertificatesTest {
      @Test fun testRoundtrip() {
        val certificateString =
          """
          -----BEGIN CERTIFICATE-----
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/publicsuffix/PublicSuffixDatabaseTest.kt

     */
    package okhttp3.internal.publicsuffix
    
    import assertk.assertThat
    import assertk.assertions.isEqualTo
    import assertk.assertions.isNull
    import assertk.assertions.isTrue
    import kotlin.test.assertEquals
    import kotlin.test.assertFailsWith
    import okhttp3.internal.toCanonicalHost
    import okio.Buffer
    import okio.FileSystem
    import okio.GzipSource
    import okio.Path.Companion.toPath
    import okio.buffer
    import okio.use
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  3. okhttp-tls/src/test/java/okhttp3/tls/CertificatesJavaTest.java

     * limitations under the License.
     */
    package okhttp3.tls;
    
    import java.security.cert.X509Certificate;
    import org.junit.jupiter.api.Test;
    
    import static org.junit.jupiter.api.Assertions.assertEquals;
    
    public class CertificatesJavaTest {
      @Test
      public void testRoundtrip() {
        String certificateString = ""
          + "-----BEGIN CERTIFICATE-----\n"
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Nov 20 02:23:18 GMT 2020
    - 1.8K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/CallKotlinTest.kt

        server.enqueue(MockResponse(body = "abc"))
    
        val request = Request.Builder().url(server.url("/")).build()
    
        val response = client.newCall(request).execute()
    
        response.use {
          assertEquals(200, response.code)
          assertEquals(
            "CN=localhost",
            (response.handshake!!.peerCertificates.single() as X509Certificate).subjectDN.name,
          )
        }
      }
    
      private fun enableTls() {
        client =
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/CertificatePinnerTest.kt

          CertificatePinner.Pin(
            "**.example.co.uk",
            "sha256/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
          )
        assertEquals(
          "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=".decodeBase64(),
          pin.hash,
        )
        assertEquals("sha256", pin.hashAlgorithm)
        assertEquals("**.example.co.uk", pin.pattern)
        Assertions.assertTrue(pin.matchesHostname("www.example.co.uk"))
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/idn/StringprepTablesReaderTest.kt

     * limitations under the License.
     */
    package okhttp3.internal.idn
    
    import assertk.assertThat
    import assertk.assertions.hasSize
    import kotlin.test.Test
    import kotlin.test.assertEquals
    import okio.Buffer
    import okio.FileSystem
    import okio.Path.Companion.toPath
    
    class StringprepTablesReaderTest {
      @Test fun readRfc3491FromResources() {
        val reader = StringprepTablesReader(FileSystem.RESOURCES)
    Plain Text
    - Registered: Fri Mar 29 11:42:11 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.4K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/MediaTypeGetTest.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3
    
    import kotlin.test.assertEquals
    import kotlin.test.assertFailsWith
    import okhttp3.MediaType.Companion.toMediaType
    
    open class MediaTypeGetTest : MediaTypeTest() {
      override fun parse(string: String): MediaType = string.toMediaType()
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/authenticator/JavaNetAuthenticatorTest.kt

    import okhttp3.Request
    import okhttp3.Response
    import okhttp3.TestValueFactory
    import okhttp3.internal.RecordingAuthenticator
    import org.junit.jupiter.api.AfterEach
    import org.junit.jupiter.api.Assertions.assertEquals
    import org.junit.jupiter.api.BeforeEach
    import org.junit.jupiter.api.Test
    
    // Most tests from URLConnectionTest
    class JavaNetAuthenticatorTest {
      private var authenticator = JavaNetAuthenticator()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  9. regression-test/src/androidTest/java/okhttp/regression/LetsEncryptTest.java

    import okhttp3.Response;
    import okhttp3.tls.HandshakeCertificates;
    import org.junit.Test;
    import org.junit.runner.RunWith;
    import javax.net.ssl.SSLHandshakeException;
    
    import static org.junit.Assert.assertEquals;
    import static org.junit.Assert.assertTrue;
    import static org.junit.Assert.fail;
    
    /**
     * Let's Encrypt expiring root test.
     *
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Nov 17 07:40:31 GMT 2020
    - 6.1K bytes
    - Viewed (0)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

    import okhttp3.testing.Flaky
    import okhttp3.testing.PlatformRule.Companion.LOOM_PROPERTY
    import okhttp3.testing.PlatformRule.Companion.getPlatformSystemProperty
    import org.junit.jupiter.api.Assertions.assertEquals
    import org.junit.jupiter.api.Assertions.fail
    import org.junit.jupiter.api.extension.AfterEachCallback
    import org.junit.jupiter.api.extension.BeforeEachCallback
    import org.junit.jupiter.api.extension.ExtensionContext
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
Back to top