我使用以下内容导入:import static org.junit.Assert.*;但在以下行:assertThat(0, is(1));我明白了The method is(int) is undefined for the type AppTest。这种方法的名称在英语中很常见,我找不到在哪里导入它。所以我的问题是,我可以在哪里导入is(和not)。
2 回答
智慧大石
TA贡献1946条经验 获得超3个赞
org.assertj.core.api.Assertions广泛提供测试用例....
import static org.assertj.core.api.Assertions.*;
assertThat(actual).isEqualTo(expected);
assertThat(actual).isNotEqualTo(expected);
添加回答
举报
0/150
提交
取消
