How to avoid multiple asserts in a JUnit test?

前端 未结 7 766
故里飘歌
故里飘歌 2020-11-29 12:12

I have a DTO which I\'m populating from the request object, and the request object has many fields. I want to write a test to check if the populateDTO() method

7条回答
  •  执笔经年
    2020-11-29 12:48

    You can have a parameterized test where the 1st parameter is the propertyname and the second the expected value.

提交回复
热议问题