package com.mytest; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; public class NestedExampleTest { @Nested //需要结合class使用 class AuthorityManage{ @Test void addUser(){ System.out.println("新增用户"); } } @Nested class UserManage{ @Test void addUser(){ System.out.println("添加用户"); } @Test void delUser(){ System.out.println("删除用户"); } } }
标签:void,System,Nested,嵌套,测试,Test,class,out From: https://www.cnblogs.com/ixtao/p/17655314.html