JUnit tests for POJOs

后端 未结 17 1689
Happy的楠姐
Happy的楠姐 2021-02-02 07:56

I work on a project where we have to create unit tests for all of our simple beans (POJOs). Is there any point to creating a unit test for POJOs if all they consist of is gette

17条回答
  •  失恋的感觉
    2021-02-02 08:17

    I'm experimenting with cobatura for code coverage and just came across the same issue.

    It would be nice to have an annotation to add to the class which said don't include this class in code coverage. However it is possible to put your pojo's in a separate package and then exclude that package from the analysis.

    See the documentation depending on your tool, it works with Ant, Maven or command line.

提交回复
热议问题