I have a class that is responsible for importing contracts from CSV into a database.
In the class itself, there is only one public method that starts the import, and the other methods are all private (because only the class itself will use it and they adhere to the logic).
I am starting to do tests for this class using Spock, and there are many private methods, how can I test it?
Should I use them for verification? Check only the main method publicly available?
Which is better?
java unit-testing junit integration-testing spock
Kennedy oliveira
source share