Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 818 Bytes

File metadata and controls

26 lines (16 loc) · 818 Bytes

Dependency Injection

This repo contains code to study the notion of "dependency injection" from the ground up, without any framework.

What do we have in the code?

We have a "pseudo system", which allows us to create a fisherman. We can ask the fisherman to get some fish for us. To do that, he will need some equipment: boots, a boat, bait and of course a fishing rod. It's a wonderful world: whenever the fisherman uses his fishing rod, he will get fresh fish.

We have a unit test that validates the behavior of the system. Let's fix the problem!

Phase 1

  • Fork the repo
  • Open the project in the IDE
  • Run the test and see it fail
  • Read the code

Phase 2

  • Fix the code to make the test pass
  • Open a pull request

Phase 3

  • Review the solutions
  • Introduce the notion of dependency injection