* New @StartStop extension for JUnit 5
This is a new take on our JUnit 5 extension. Rather than creating and managing
the MockWebServer instance in the extension, we let the user create it and all
the extension does is manage the lifecycle.
Note that this annotation doesn't require any external configuration - it doesn't
need a system-property to opt-into 'automatic' extensions, and it doesn't require
a class-level extension either.
* apiDump
* Switch to @StartStop for JUnit 5 tests
* Fixup visibility
---------
Co-authored-by: Jesse Wilson <jwilson@squareup.com>
* Decompose the request line into individual properties
Replace the 'path' property with the URL's encodedPath
property.
Rename the 'requestUrl' property to 'url'.
* Spotless
* Fix up DnsOverHttpsTest
* Fix some test failures
* Simplify the logic.
Rely on OkHttpClient caching, instead of a cache only request.
* Simplify the logic.
Rely on OkHttpClient caching, instead of a cache only request.
* Change parameter order for Cache constructor
Put FileSystem before Path, as is convention.
Also put this new constructor in the public API.
* apiDump
* Track the change in RunSurvey
* Track signature change
* Add a cacheUrlOverride
* Add a cacheUrlOverride
* Add a cacheUrlOverride
* Add a cacheUrlOverride
* Add a cacheUrlOverride
* Add Cache Test
* Add Cache Test
* Fix test
* Update okhttp/src/main/kotlin/okhttp3/Request.kt
Co-authored-by: Jesse Wilson <jwilson@squareup.com>
* Update okhttp/src/test/java/okhttp3/CacheTest.kt
Co-authored-by: Jesse Wilson <jwilson@squareup.com>
* Update okhttp/src/test/java/okhttp3/CacheTest.kt
Co-authored-by: Jesse Wilson <jwilson@squareup.com>
* Update okhttp/src/test/java/okhttp3/CacheTest.kt
Co-authored-by: Jesse Wilson <jwilson@squareup.com>
---------
Co-authored-by: Jesse Wilson <jwilson@squareup.com>
* Prepare to enable Spotless
I'm not super keen on any of these changes, but I am very
keen on having automatic formatting.
* Don't actually enable Spotless yet
* Switch to assertk.fail
* Use assertFailsWith
* More assertFailsWith
* Use more assertFailsWith
* More assertFailsWith
* More assertFailsWith
* Native image dependencies
* Move JUnit dependency
* Don't lock in a specific implementation class
* Missing finally
* Switch to a Builder for mockwebserver3.MockResponse
* Migrate lots of tests to MockResponse.Builder
* Improve some code style
* Follow naming conventions in MockResponse.Builder
* Apply side-effects for inTunnel=true
* Update the API
I attempted to do a literal translation as much as possible.
Subprojects now need plugins to be configured directly so they
can use the appropriate syntax.
Also rename okhttp3.mockwebserverwrapper to okhttp3.mockwebserver
Directories are not renamed to minimize the git diff. That'll follow
in a separate commit.
Most users of the API are not impacted. The ones that are:
- CallTest subclasses QueueDispatcher
- DuplexTest uses duplex APIs
- HttpOverHttp2Test subclasses QueueDispatcher
This is part 2 of the plan described here:
https://github.com/square/okhttp/pull/6326