java - Unit test helper methods? -


I have classes that were previously large scale methods, so I divided the work of this method into 'subsidiary' methods. .

To declare these supporting methods, private is declared - though I want the unit to test large public statutes. Is it good to test the supportive methods for the unit, as if any of them fails the public law, the caller will also fail, and in this way we can identify why this is unsuccessful?

A fake object will need to keep my visibility protected from private, is it desirable?

Leave the same path as private and test it in the same package Then the test can call internal methods, but any other (= outside the package) can do.

In addition, failure of internal methods causes error messages to be generated which makes it easy to fix the problem. When you put the code into the production, you will see less than the tests and you will be under great pressure to fix the problems. I spent a minute here and an hour later your boss would sit in his neck.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

jquery - SimpleModal Confirm fails to submit form -