Given
Given
When
When
When
Then
Then
The argument is that this doesn't really read like a story and just seems like I am stuttering.
So I would like to make a small modification to this to show 2 points.
The test name
The test name will really be something descriptive that is most logical:GivenARectangleWithWidthOf10AndHeightOf10TheAreaShouldCalculate100
I am sure I don't have to add the virtual spaces to make it more readable at this point as you would get the idea. The wording here is completely logical.
Implementation
To actually write this implementation that satisfies the test I am going write a Shape
and Calculator
and throw in a Visitor just to make it more interesting.
Now to write the grammar in a little bit more like a human, I thought to simply add an And
method.
Here is the full test and test class implementation:
No comments:
Post a Comment