Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
skychiarottoa authored Nov 6, 2020
1 parent e3fc8ff commit 02b17ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ class LoginTests: SkyUITestCase {
### UI UITestHttpServerBuilder
Mock server builder to be used in UI tests.
#### func route(_ response: (endpoint: String, statusCode: Int, body: Data, responseTime: UInt32?), on: ((Swifter.HttpRequest) -> Void)? = nil) -> UITestHttpServerBuilder
Adds http route to mock server. Clousure `on` is called on main thread when a http request with path equals to `endpoint` is received by the mock server.
Adds http route to mock server. Clousure `on` is called on main the thread when a http request with path equals to `endpoint` is received by the mock server.
#### func route(endpoint: String, on: @escaping ((Swifter.HttpRequest) -> HttpResponse)) -> UITestHttpServerBuilder
Adds http route to mock server. Closure `on` id called on a background thread when a http request with path equals to `endpoint` is received by the mock server. The closure allows to return different Http responses given an http request.
Adds http route to mock server. Closure `on` is called on a background thread when a http request with path equals to `endpoint` is received by the mock server. The closure allows to return different Http responses given an http request.
#### buildAndStart(port: in_port_t = 8080, file: StaticString = #file, line: UInt = #line) throws -> HttpServer
Build all routes added so far and starts the mock server.

Expand Down

0 comments on commit 02b17ae

Please sign in to comment.