JUnit tests for POJOs

后端 未结 17 1688
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:20

    MeanBean library provides an API to test POJOs. For example following snippet test whether Emplooyee pojo. Demo Application link.

    BeanTester beanTester = new BeanTester();
    beanTester.testBean(Employee.class);
    

提交回复
热议问题