Skip to content

Commit

Permalink
Update instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
megabyde committed Jan 21, 2024
1 parent fcb0c52 commit 6b2f8ad
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

This kata complements [Clean Code: Advanced TDD, Ep. 23](https://cleancoders.com/episode/clean-code-episode-23-p1).

This repository contains an exercise designed to improve your skills in
This repository contains two exercises designed to improve your skills in
test-driven development. It represents code you inherited from a legacy code
base.

As a first step, try to get some kind of test in place before you change the
class at all. If the tests are hard to write, is that because of the problems
with SOLID principles?

### Exercise
### Exercise 1

Write the unit tests for the `Alarm` class. The `Alarm` class is designed to
monitor tire pressure and set an alarm if the pressure falls outside of the
Expand All @@ -24,6 +24,20 @@ expected range.
The `Sensor` class provided for the exercise simulates the behaviour of a real
tire sensor, providing random but realistic values.

You can choose to use stubs, mocks, or none at all. If you do, you are free to
use the mocking tool that you prefer.

> **Note**
>
> If you decide to use mocks, we recommend using the
> [unittest.mock](https://docs.python.org/3/library/unittest.mock.html)
> mock object library.
### Exercise 2

Use one of the mocking patterns: Self-Shunt, Test-Specific Subclass, or Humble
Object. If you used one of them already, use another one.

## Usage

You can import this project into [Replit](https://replit.com), and it will
Expand Down

0 comments on commit 6b2f8ad

Please sign in to comment.