dimanche 30 août 2015

How to test long nested properties method invocation?

how should I test methods which calling nested property method? Something like:

PropertyA.PropertyB.PropertyC.DoSomething();

Should I create mock for each property and check if method DoSomething() was called? Looks like a lot of test code for simple method invocation. Is there a better way?

Aucun commentaire:

Enregistrer un commentaire