Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for toURL (0.03 sec)

  1. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        server.enqueue(MockResponse())
        try {
          server
            .url("/a")
            .toUrl()
            .openConnection()
            .getInputStream()
          fail<Any>()
        } catch (expected: IOException) {
        }
        server
          .url("/b")
          .toUrl()
          .openConnection()
          .getInputStream() // Should succeed.
      }
    
      /**
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 03 13:16:34 UTC 2025
    - 22.3K bytes
    - Viewed (0)
  2. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

        server.enqueue(MockResponse())
        try {
          server
            .url("/a")
            .toUrl()
            .openConnection()
            .getInputStream()
          fail<Unit>()
        } catch (expected: IOException) {
          // Expected.
        }
        server
          .url("/b")
          .toUrl()
          .openConnection()
          .getInputStream() // Should succeed.
      }
    
      @Test
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Aug 03 22:38:00 UTC 2025
    - 28K bytes
    - Viewed (0)
  3. fess-crawler/src/test/java/org/codelibs/fess/crawler/client/ftp/FtpClientTest.java

            assertEquals("ftp://123.123.123.123/ccc.txt", ftpInfo.toUrl("/aaa/../ccc.txt"));
    
            value = "ftp://123.123.123.123/test test.txt";
            ftpInfo = new FtpClient.FtpInfo(value, Constants.UTF_8);
            assertEquals(value, ftpInfo.toUrl());
            assertEquals("123.123.123.123:21", ftpInfo.getCacheKey());
            assertEquals("123.123.123.123", ftpInfo.getHost());
    Registered: Sun Sep 21 03:50:09 UTC 2025
    - Last Modified: Sat Sep 06 04:15:37 UTC 2025
    - 18K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/core/io/ResourceUtilTest.java

            final URL url = new File("/Program File").toURI().toURL();
            assertEquals("file:" + getRoot() + "Program File", ResourceUtil.toExternalForm(url));
        }
    
        /**
         * @throws Exception
         */
        public void testGetFileName() throws Exception {
            URL url = new File("/Program File").toURI().toURL();
            assertEquals(getRoot() + "Program File", ResourceUtil.getFileName(url));
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sat May 10 01:32:17 UTC 2025
    - 4.3K bytes
    - Viewed (0)
  5. src/test/java/org/codelibs/core/jar/JarFileUtilTest.java

        /**
         * @throws Exception
         */
        public void testToJarFilePath() throws Exception {
            final File f = new File("/Program Files/foo.jar");
            final URL url = new URL("jar:" + f.toURI().toURL() + "!/");
            final String root = new File("/").getCanonicalPath();
            assertEquals(root + "Program Files" + File.separator + "foo.jar", JarFileUtil.toJarFilePath(url));
        }
    
        /**
         * @throws Exception
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sat May 10 01:32:17 UTC 2025
    - 1.5K bytes
    - Viewed (0)
  6. mockwebserver/src/test/java/mockwebserver3/CustomDispatcherTest.kt

              requestsMade.add(request)
              return MockResponse()
            }
          }
        assertThat(requestsMade.size).isEqualTo(0)
        mockWebServer.dispatcher = dispatcher
        val url = mockWebServer.url("/").toUrl()
        val conn = url.openConnection() as HttpURLConnection
        conn.responseCode // Force the connection to hit the "server".
        // Make sure our dispatcher got the request.
        assertThat(requestsMade.size).isEqualTo(1)
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/authenticator/JavaNetAuthenticator.kt

                challenge.scheme,
                url.toUrl(),
                Authenticator.RequestorType.PROXY,
              )
            } else {
              Authenticator.requestPasswordAuthentication(
                url.host,
                proxy.connectToInetAddress(url, dns),
                url.port,
                url.scheme,
                challenge.realm,
                challenge.scheme,
                url.toUrl(),
                Authenticator.RequestorType.SERVER,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  8. mockwebserver-junit4/src/test/java/mockwebserver3/junit4/MockWebServerRuleTest.kt

                rule.server
                  .url("/")
                  .toUrl()
                  .openConnection()
                  .connect()
              }
            },
            Description.EMPTY,
          )
        statement.evaluate()
        assertThat(called.get()).isTrue()
        try {
          rule.server
            .url("/")
            .toUrl()
            .openConnection()
            .connect()
          fail()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.6K bytes
    - Viewed (0)
  9. src/test/java/org/codelibs/core/io/ResourceTraversalTest.java

            final URL classURL = ResourceUtil.getResource(classFilePath);
            final URL jarURL = new File(JarFileUtil.toJarFilePath(classURL)).toURI().toURL();
            ResourceTraversalUtil.forEach(new ZipInputStream(jarURL.openStream()), (ResourceHandler) (path, is) -> {
                try {
                    if (count < 10) {
                        System.out.println(path);
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sat May 10 01:32:17 UTC 2025
    - 6K bytes
    - Viewed (0)
  10. container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt

          assertThat(response.protocol).isEqualTo(Protocol.HTTP_1_1)
        }
      }
    
      @Test
      fun testUrlConnectionDirect() {
        testRequest {
          val url = URI(mockServer.endpoint + "/person?name=peter").toURL()
    
          val connection = url.openConnection() as HttpURLConnection
    
          assertThat(
            connection.inputStream
              .source()
              .buffer()
              .readUtf8(),
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 6.2K bytes
    - Viewed (0)
Back to top