lundi 22 février 2016

Change method accessibility i order to test it

I have a pubic method that calls group of private methods.

I would like to test each of the private method with unit test as it is to complected to tests everything through the public method ,

Is think it will be a bad practice to change method accessibility only for testing purposes.

But the I dont see any other way to test it (maybe reflaction , but it is ugly)

Aucun commentaire:

Enregistrer un commentaire