Expand description
Various helpers for ntex applications to use during testing.
Structs§
- Test
Request - Test
Requestbuilder. - Test
Server - Test server controller
- Test
Server Config - Test server configuration
Functions§
- call_
service - Calls service and waits for response future completion.
- config
- Create default test server config
- default_
service - Create service that responds with response with specified status code
- from_
request - Helper method for extractors testing
- init_
service - This method accepts application builder instance, and constructs service.
- init_
service_ st - This method accepts application builder instance, and constructs service with specified state.
- load_
stream - Reads response’s body and combines it to a Bytes objects
- ok_
service - Create service that always responds with
HttpResponse::Ok() - read_
body - Helper function that returns a response body of a
WebResponse - read_
response - Helper function that returns a response body of a
TestRequest - read_
response_ json - Helper function that returns a deserialized response body of a
TestRequest - respond_
to - Helper method for responders testing
- server
- Start test server with default configuration
- server_
with - Start test server with custom configuration