dimanche 4 janvier 2015

How to avoid lots of pre-conditions for unit-testing?

I'm developing a card game, and I'm fairly new to unit-testing. When I wanted to test certain functionalities like "Who has won this game?" or "Does my state transition works probably?", I end up writing a whole bunch of different "setting up" codes for each test that I can't simply put them in "before / beforeEach" segment of test. Is there any better way to do this?


Aucun commentaire:

Enregistrer un commentaire