Expand description
Test utilities
A collection of testing utilities and helpers:
assert
: Custom assertions for comparing directory structures, iterables, JSON strings and morebuilder
: Test data builders and fixturescrypto_helper
: Cryptographic utilities for testingdouble
: Test doubles (mocks, fakes, dummies, …)entities_extensions
: Extension traits adding test-specific methods for crate::entitieslogging
: Test logging infrastructuremock_extensions
: Additional mocking utilitiestemp_dir
: Temporary directory management for tests
Modules§
- builder
- Builders for test
- crypto_
helper - Test utilities for Mithril STM types
- double
- Test doubles
- entities_
extensions - A set of extension traits to add test utilities to this crate
entities
- logging
- Logging utilities for tests
- mock_
extensions - A set of tools for working with
automock
Macros§
- assert_
dir_ eq - Compare a directory against a string representing its expected structure or against another directory.
- assert_
equivalent - Assert that two iterators are equivalent
- assert_
same_ json - Compare two json strings ignoring keys order
- current_
function - Returns the name of the function that called this macro.
- current_
function_ path - Returns the path of the function that called this macro.
- temp_
dir - Return a temporary directory based on the current function name.
- temp_
dir_ create - Create and return a temporary directory based on the current function name.
Structs§
- DirStructure
- A structure to compare two directories in a human-readable way in tests.
- TempDir
- A builder of temp directory for tests purpose.
Functions§
- as_
sorted_ vec - Create a sorted clone of an iterable.
- equivalent_
to - Compare two iterators ignoring the order
- format_
current_ function_ module - Return the path of the given function.
If the last function is
f
, it is removed. The last{{closure}}
is also removed. - format_
current_ function_ path - Return a string representing the path of the given function.