Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 58 for newBuilder (0.17 sec)

  1. android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java

            () -> CacheBuilder.newBuilder().weigher(constantWeigher(42)).maximumSize(1));
        assertThrows(
            IllegalStateException.class,
            () -> CacheBuilder.newBuilder().maximumSize(1).weigher(constantWeigher(42)));
      }
    
      @GwtIncompatible // weakKeys
      public void testKeyStrengthSetTwice() {
        CacheBuilder<Object, Object> builder1 = CacheBuilder.newBuilder().weakKeys();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/ConnectionCoalescingTest.kt

        val differentDnsUrl = url.newBuilder().host("differentdns.com").build()
        assertFailsWith<IOException> {
          execute(differentDnsUrl)
        }
      }
    
      @Test
      fun skipsOnRedirectWhenDnsDontMatch() {
        server.enqueue(
          MockResponse.Builder()
            .code(301)
            .addHeader("Location", url.newBuilder().host("differentdns.com").build())
            .build(),
        )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 18.7K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

            () -> CacheBuilder.newBuilder().weigher(constantWeigher(42)).maximumSize(1));
        assertThrows(
            IllegalStateException.class,
            () -> CacheBuilder.newBuilder().maximumSize(1).weigher(constantWeigher(42)));
      }
    
      @GwtIncompatible // weakKeys
      public void testKeyStrengthSetTwice() {
        CacheBuilder<Object, Object> builder1 = CacheBuilder.newBuilder().weakKeys();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 25.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

            CacheBuilder.newBuilder().expireAfterWrite(10L, TimeUnit.MINUTES), CacheBuilder.from(spec));
      }
    
      public void testParse_writeExpirationSeconds() {
        CacheBuilderSpec spec = parse("expireAfterWrite=10s");
        assertEquals(TimeUnit.SECONDS, spec.writeExpirationTimeUnit);
        assertEquals(10L, spec.writeExpirationDuration);
        assertCacheBuilderEquivalence(
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 19.2K bytes
    - Viewed (0)
  5. maven-api-impl/src/main/java/org/apache/maven/internal/impl/SettingsUtilsV4.java

            Profile.Builder profile = Profile.newBuilder();
    
            profile.id(modelProfile.getId());
    
            org.apache.maven.api.model.Activation modelActivation = modelProfile.getActivation();
    
            if (modelActivation != null) {
                Activation.Builder activation = Activation.newBuilder();
    
                activation.activeByDefault(modelActivation.isActiveByDefault());
    
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Mon Mar 25 10:50:01 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt

        val request = Request(server.url("/"))
        assertConnectionNotReused(request, request)
      }
    
      @Test
      fun connectionsAreNotReusedIfPoolIsSizeZero() {
        client =
          client.newBuilder()
            .connectionPool(ConnectionPool(0, 5, TimeUnit.SECONDS))
            .build()
        server.enqueue(MockResponse(body = "a"))
        server.enqueue(MockResponse(body = "b"))
        val request = Request(server.url("/"))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

            CacheBuilder.newBuilder().expireAfterWrite(10L, TimeUnit.MINUTES), CacheBuilder.from(spec));
      }
    
      public void testParse_writeExpirationSeconds() {
        CacheBuilderSpec spec = parse("expireAfterWrite=10s");
        assertEquals(TimeUnit.SECONDS, spec.writeExpirationTimeUnit);
        assertEquals(10L, spec.writeExpirationDuration);
        assertCacheBuilderEquivalence(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 19.2K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/InterceptorTest.kt

            val sameHost = address.url.host
            val differentPort = address.url.port + 1
            chain.proceed(
              chain.request().newBuilder()
                .url("http://$sameHost:$differentPort/")
                .build(),
            )
          }
        client =
          client.newBuilder()
            .addNetworkInterceptor(interceptor)
            .build()
        val request =
          Request.Builder()
            .url(server.url("/"))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 27.8K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/CookiesTest.kt

      fun setUp(server: MockWebServer) {
        this.server = server
      }
    
      @Test
      fun testNetscapeResponse() {
        val cookieManager = CookieManager(null, CookiePolicy.ACCEPT_ORIGINAL_SERVER)
        client =
          client.newBuilder()
            .cookieJar(JavaNetCookieJar(cookieManager))
            .build()
        val urlWithIpAddress = urlWithIpAddress(server, "/path/foo")
        server.enqueue(
          MockResponse.Builder()
            .addHeader(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
  10. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

      }
    
      @Test
      fun testDnsOverHttps() {
        assumeNetwork()
    
        client =
          client.newBuilder()
            .eventListenerFactory(clientTestRule.wrap(LoggingEventListener.Factory()))
            .build()
    
        val dohDns = buildCloudflareIp(client)
        val dohEnabledClient =
          client.newBuilder().eventListener(EventListener.NONE).dns(dohDns).build()
    
        dohEnabledClient.get("https://www.twitter.com/robots.txt")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 27K bytes
    - Viewed (1)
Back to top