http_mock_adapter 0.4.0 copy "http_mock_adapter: ^0.4.0" to clipboard
http_mock_adapter: ^0.4.0 copied to clipboard

A simple to use mocking package for Dio intended to be used in tests. It provides various types and methods to declaratively mock request-response communication.

Changelog #

All notable changes to this project will be documented in this file.

Minor versions will be bundled with more important versions.

The format is influenced by Keep a Changelog.

Subsequently, the date entry follows YYYY-MM-DD format in accordance with the ISO 8601 standard.

This project adheres to Semantic Versioning.


[v0.4.0] (2023-02-14) #

  • Updated

    • Dio dependency to 5.0.0
    • Github Workflow (release on tag)
    • Codecov token
    • Collection to 1.17.1
  • Removed

    • Recursive export of matchers.dart
    • Unnecessary ListParam

[v0.3.3] (2022-03-23) #

  • Added

    • delay property to MockServer methods: (reply & throws)
    • HttpRequestMatcher super class & its implementations FullHttpRequestMatcher, UrlRequestMatcher.
    • Utilities file for tests.
  • Updated

    • Docs in README.md and example/main.dart.
    • Tests for DioAdapter.

[v0.3.2] (2021-07-26) #

  • Added

    • Automatic wrapping of FormData in a fitting matcher.
  • Fixed

    • Missing expectation in map not causing test failures.
  • Removed

    • Header matcher.
  • Updated

    • Tests for DioAdapter and DioInterceptor by combining them.

[v0.3.1] (2021-06-16) #

  • Removed

    • Unused import and code regarding io_adapter that reduced the overall score of the package.
  • Updated

    • pub badge link in README.md.

[v0.3.0] (2021-06-16) #

  • Added

    • Remaining tests for formal 100% coverage;
    • Code coverage badge;
    • New, official Dart linter (lints) and some custom rules;
    • Constructors to DioAdapter and DioInterceptor;
    • ClosedException, thrown when DioAdapter is closed yet used;
    • Builder method for Signature extension.
  • Removed

    • Unused package and code, such as mockito and/or DioAdapterMockito;
    • Some portion of seemingly excessive documentation;
    • Generally unnecessary pieces of code.
  • Updated

    • Tests and lots of files due to refactoring;
    • Packages;
    • Names of types, methods and variables for better clarity.

[v0.2.1] (2021-04-02) #

  • Removed

    • Unused and artificially deprecated code.
  • Updated

    • CI workflow;
    • Packages.

[v0.2.0] (2021-04-02) #

  • Added
    • Null safety.

[v0.1.6] (2021-03-30) #

  • Added

    • Ability to match routes based on pattern;
    • Tests;
    • Straightforward way to reset history;
    • Query parameters to RequestRouted's methods.
  • Fixed

    • Response problems regarding closed streams.
  • Removed

    • Singleton instances of DioAdapter and DioInterceptor;
  • Updated

    • Match variable names;
    • matches function to include null check;
    • .gitignore now includes pubspec.lock;
    • Request mock method chaining variation.

[v0.1.5] (2021-01-07) #

  • Added

    • Matchers class that contains various types of request data matchers for dynamic signature matching;
    • Dart CI workflow;
    • git tags for untagged releases/publications;
    • Specific imports by utilizing Dart's show keyword.
  • Removed

    • Unnecessary node_modules/ directory with its content;
    • Unnecessary workflows/ directory with its content in .github/ISSUE_TEMPLATE/ directory;
    • Unnecessary package-lock.json file;
    • Unnecessary .metadata file.
  • Updated

    • Issue templates;
    • Pull request template;
    • example/main.dart code;
    • Source code formatting/style;
    • Source code documentation;
    • License's Copyright (c) year;
    • http and test dev_dependencies' version;
    • Header setting logic for both request and response (Defaults to JSON and matches any Headers.contentTypeLength);
    • Project's meta files;
    • Tests by relocating, reformatting, organizing them.

[v0.1.4] (2020-12-28) #

  • Added

    • throws method to test Dio exceptions.
  • Fixed

    • Signature related bug.
  • Updated

    • Package architecture.

[v0.1.3] (2020-12-4) #

  • Updated
    • Package's documentation;
    • Request handling through headers.

[v0.1.2] (2020-11-26) #

  • Updated
    • GitHub Actions workflow upon each version update on each push made to main branch.

[v0.1.1] (2020-11-23) #

  • Added

    • Author metadata;
    • Automatic publishing on https://pub.dev through GitHub Actions.
  • Updated

    • Routing logic;
    • Package documentation.

[v0.1.0] (2020-11-20) #

  • Added

    • History mixin to keep track of request history;
    • HTTP methods;
    • RequestRouted - exposes developer-friendly methods which take in routes;
    • RequestHandler - The handler of requests sent by clients;
    • DioAdapter without mockito;
    • Mocked version of DioAdapter;
    • Tast cases;
    • Non-sequential responding.
  • Removed

    • MockHandler - Temporarily deprecated (ensures that mock data is saved and retrieved from the disk).

[v0.0.1] (2020-11-09) #

  • Added
    • The MIT License.
156
likes
0
pub points
97%
popularity

Publisher

verified publisherlomsa.com

A simple to use mocking package for Dio intended to be used in tests. It provides various types and methods to declaratively mock request-response communication.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

collection, dio, http_parser

More

Packages that depend on http_mock_adapter