http-mock-adapter icon indicating copy to clipboard operation
http-mock-adapter copied to clipboard

A simple to use mocking package for Dio intended to be used in tests.

Results 18 http-mock-adapter issues
Sort by recently updated
recently updated
newest added

## 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...

bug

## 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...

bug

Hello, i don't see the option to use onSimpleGet, how i can do to test using this new method?

question

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...

enhancement

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...

enhancement

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.

enhancement

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...

enhancement
question
low priority

## 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...

bug

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...