由于方法 Assert.assertEquals
已被弃用,我们现在应该使用哪种方法?
以下代码:
String arg1 = "test";
String arg2 = "me";
Assert.assertEquals(arg1, arg2);
给出以下警告:
Multiple markers at this line
- The method assertEquals(String, String) from the type Assert is deprecated
- The type Assert is deprecated
最佳答案
您正在使用 junit.framework.Assert
而不是 org.junit.Assert
。
关于java - 警告 : The method assertEquals from the type Assert is deprecated,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22541455/