views:

3

answers:

1

I'd like to write some integration tests for a card game I'm creating. However, it's based on a shuffle. The only solution I can think of to get predictable results to test is stubbing the shuffle, however I'm uncomfortable doing any stubbing in an integration test. Are there any alternative strategies?

A: 

What is the aim of the test?

Stubbing in an integration test is IMO fine, all tests should only test the components under test. One other option would be to allow the Shuffle to take a seed.

mlk