2 ms·
A situation in which I've used mocking well: testing parsing of data coming over a serial port. I have had several situations to need to parse common data forma
by moron4hire 7y ago
A situation in which I've used mocking well: testing parsing of data coming over a serial port. I have had several situations to need to parse common data formats coming from hardware over a wire and mocking that data with recorded streams is super helpful for making sure your parser is working right.
- arantius 7y agoIt sounds to me like you've got two things: some hardware code, and some data code. You're not testing the hardware code, you are testing the data code. If you split them into two places, you could get the same effect, with no mocks. And be more clear about what parts are tested and what aren't.
- moron4hire 7y agoThat is literally what I said I was doing.