http-mock-adapter
http-mock-adapter copied to clipboard
A simple to use mocking package for Dio intended to be used in tests.
## Description When registering the same route with different HTTP methods, it seems that the latest registered route always takes precedence, no matter what HTTP method is used. ## Steps...
## Description Describe the bug. ## Steps to reproduce 1. Steps 2. To 3. Reproduce 4. ... ## Expected behavior A clear and concise description of what you expected to...
Hello, i don't see the option to use onSimpleGet, how i can do to test using this new method?
The current implementation of the `http_mock_adapter` library provides a convenient way to mock server responses with the `delay` parameter in the `MockServer` reply. However, it lacks the ability to simulate...
I would like to test a retry mechanism. Therefore I want the server to return different responses. The first response should be a 500 and the second one a 200....
### Implement faker for generating fake data depending on the response and request models of mapped endpoints. Currently, we need to provide different types of data, manually to test various...
Currently there are no methods for mocking the Dio methods **download** and **downloadUri**. Would be greate if you can add **onDownload** and **onDownloadUri,** so we can mock these methods.
It could be helpful to use semantic release (https://github.com/semantic-release/semantic-release) in https://github.com/lomsa-dev/http-mock-adapter/blob/main/.github/workflows/publish.yml I know from another flutter package that uses also a github action (https://github.com/cycjimmy/semantic-release-action) this way: https://github.com/Stacked-Org/stacked/blob/master/.github/workflows/release.yml The really cool...
## Description According to my observation, the `data` field on `dioAdapter.onPost` is compared before it's encoded to json. I use json_annotation, where some fields are configured not to be present...
I will write test code like this: `dioAdapter.onPost("some_route", (server) => server.reply(...), data: Matchers.any);` I am very much bugged that I do not know the type of 'server'. Moreover, I don't...