What's the purpose of the JUnit 5 @Nested annotation

前端 未结 4 1691
故里飘歌
故里飘歌 2021-02-18 21:14

In JUnit 5, there is a new annotation: @Nested.

I understand how it work, I understand why we use nested class, I just don\'t understand why we need to have

4条回答
  •  孤街浪徒
    2021-02-18 21:52

    @Nested - Mainly starts from Junit5, provides the continuation logic of a feature we are attempting to do. Split the business test scenarios to multiple classes, @nested is in use.

提交回复
热议问题