在使用Java JUnit时,通常需要添加以下Maven依赖项:

<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.13.2</version>
    <scope>test</scope>
</dependency>

这将添加JUnit库到您的项目中,以便在测试代码中使用。请注意,上述依赖项是针对JUnit 4的,如果您要使用JUnit 5,需要使用不同的依赖项。


原文地址: https://www.cveoy.top/t/topic/hWWd 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录