lundi 8 juin 2015

Unit test package protected classes without mock

I am currently using Java for an application and I want to write unit tests for this application. I have some classes in different packages in the application and some of these classes have the access modifier /* package protected */, i.e no access modifier. I would very much like to keep this but how is this handled for tests, since they are not located in the same package? Will this complicate things? If the alternative is to use some mock libraries, it's just not worth it and I'll make my classes public.

I'm using Android studio and the application is an Android app, by the way.

Aucun commentaire:

Enregistrer un commentaire