I’m still working on learning Rust. Beyond syntax, learning a language requires familiarizing oneself with its idioms and ecosystem. I’m at a point where I want to explore testing in Rust.
The Initial Problem
We have used Dependency Injection a lot – for ages on the JVM. Even if you’re not using a framework, Dependency Injection helps decouple components. Here’s a basic example: