You used to support reflection to test private methods; why have you stopped? Someone said reflection was bad practice but I can’t get a good answer why?
Any ideas?
You used to support reflection to test private methods; why have you stopped? Someone said reflection was bad practice but I can’t get a good answer why?
Any ideas?
Using Reflection in unit tests has a couple of problems:
Of course, sometimes people really do want to test a private method in isolation and they resort to using reflection. However, its often possible to reconsider the architecture of such a class or method to make it easier to test without reflection.