mockable
This crate provides usefull traits to make easier to mock your code using mockall
crate.
Getting Started
Add this to your Cargo.toml
:
[]
= { = "0.3", = [ ... ] }
[]
= { = "0.3", = ["mock"] }
Documentation
Clock
The Clock
trait provides a way to mock the current time.
Note: This trait is only available when the clock
feature is enabled.
Command Runner
The CommandRunner
trait provides a way to mock the execution of commands.
Note: This trait is only available when the cmd
feature is enabled.
Env
The Env
trait provides a way to mock the environment variables.
File System
The FileSystem
trait provides a way to mock the file system operations.
HTTP Client
The HttpClient
trait provides a way to mock the HTTP client.
Note: This trait is only available when the http
feature is enabled.
Mock
The Mock
trait provides a way to mock a function.
PostgreSQL Client
The PostgresClient
trait provides a way to mock the interraction with a PostgreSQL database.
Note: This trait is only available when the postgres
feature is enabled.
System
The System
trait provides a way to mock the system.
UUID Generator
The UuidGenerator
trait provides a way to mock the UUID generator.
Note: This trait is only available when the uuid
feature is enabled.