Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Unit testing best practices.
Of course it is!
> Mock out all external services and state
... unless those 'external services' are an essential part of you application (e.g. databases).
> Don’t unit-test configuration settings
Unit-test anything that needs to be unit-tested.
> All methods, regardless of visibility, should have appropriate unit tests
Capable of being misunderstood ...
> Aim for each unit test method to perform exactly one assertion
This limitation makes no sense.
> Do not print anything out in unit tests
Arbitrary restriciton.
> Capture results using the XML formatter
But why?
tl;dr Thanks, but I stick to my own tried and proven Unit-test guidelines.
There are no comments on this comment yet.
Of course it is!
> Mock out all external services and state
... unless those 'external services' are an essential part of you application (e.g. databases).
> Don’t unit-test configuration settings
Unit-test anything that needs to be unit-tested.
> All methods, regardless of visibility, should have appropriate unit tests
Capable of being misunderstood ...
> Aim for each unit test method to perform exactly one assertion
This limitation makes no sense.
> Do not print anything out in unit tests
Arbitrary restriciton.
> Capture results using the XML formatter
But why?
tl;dr Thanks, but I stick to my own tried and proven Unit-test guidelines.