Testing a Visitor - Mocking and Test Readability(rasmuskl.dk)
submitted by
rasmuskl(110) 3 years, 4 months ago
The other day I was using TDD to write a visitor for an object graph at work. I often use mocks a lot and was using mocks in this particular batch of tests as well. However, in the end creating my own fake class turned out to be much better (in my opinion). Favoring state-based testing over interaction-based testing (sometimes) can really simplify the noise within a test and provide clarity.
|category: Tips & Tricks
|Views: 12
tags:
Tips another
Everyones tags:
Your Tags: