I'm starting to write JUnit test cases for an outdated codebase. One public method has several if statements and is based on the condition that it calls different private methods.
Do I have to write only one test method and check all conditions? or one method for each condition?
Will I not lose consistency if I write separate methods for each if condition?
What is the approach to checking private methods? The private logic of a method can be more complex than public methods.
source
share