Java test class with many private methods

前端 未结 4 585
终归单人心
终归单人心 2021-01-11 17:42

I have a class that has the responsibility of importing contracts from a CSV to database.

The class itself has only one public method that starts the import and the

4条回答
  •  鱼传尺愫
    2021-01-11 18:41

    If your class implements an interface you can make "public" all methods you like to tests, but do not add them to interface. In this case you will be able to access to these methods from test but not from you src.

提交回复
热议问题