Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for assertNoCacheResponse (0.32 sec)

  1. okhttp/src/test/java/okhttp3/RecordedResponse.kt

      fun assertNoNetworkResponse() =
        apply {
          assertThat(response!!.networkResponse).isNull()
        }
    
      /** Asserts that the current response didn't use the cache.  */
      fun assertNoCacheResponse() =
        apply {
          assertThat(response!!.cacheResponse).isNull()
        }
    
      /**
       * Asserts that the current response used the cache and returns the cache response.
       */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/CallTest.kt

      fun onlyIfCachedReturns504WhenNotCached() {
        executeSynchronously("/", "Cache-Control", "only-if-cached")
          .assertCode(504)
          .assertBody("")
          .assertNoNetworkResponse()
          .assertNoCacheResponse()
      }
    
      @Test
      fun networkDropsOnConditionalGet() {
        client =
          client.newBuilder()
            .cache(cache)
            .build()
    
        // Seed the cache.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
Back to top