Junit 5官方文档中文版
Search…
⌃K
Introduction
用户指南
概况
安装
编写测试
注解
标准测试类
显示名称
断言
假设
禁用
标签和过滤
测试实例生命周期
嵌套测试
构造函数和方法的依赖注入
测试接口和默认方法
重复测试
参数化测试
测试模板
动态测试
运行测试
扩展模型
从Junit4迁移
高级主题
API演进
Powered By
GitBook
编写测试
第一个测试案例:
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertEquals
;
import
org
.
junit
.
jupiter
.
api
.
Test
;
class
FirstJUnit5Tests
{
@Test
void
myFirstTest
()
{
assertEquals
(
2
,
1
+
1
);
}
}
Previous
JUnit Jupiter示例项目
Next
注解
Last modified
4yr ago