I totally disagree about increasing our attack surface in order to make testing easier. Testing private members is possible but makes testing process harder. From my point of view is a price I'm willing to pay .. but thats just me.
Im sorry but Ill have to disagree with you on testing private members.
If you are building a framework, the API is a deliverable.
On one hand, I cant make a member public just for testability. On the other hand I want to break my class into easily testable members private, but testable.
If I have to make something public just for the sake of public testability, its a bad design. At least I think it is.
I totally disagree about increasing our attack surface in order to make testing easier. Testing private members is possible but makes testing process harder. From my point of view is a price I'm willing to pay .. but thats just me.
NunoMiguelFGomes 2 years ago
Im sorry but Ill have to disagree with you on testing private members.
If you are building a framework, the API is a deliverable.
On one hand, I cant make a member public just for testability. On the other hand I want to break my class into easily testable members private, but testable.
If I have to make something public just for the sake of public testability, its a bad design. At least I think it is.
PauloMorgado 2 years ago