我正在运行一些JUnit测试,并且遇到了一个ComparisonFailure,但我不明白为什么,因为我的实际和预期看起来完全相同。correctline = " The following quotation about writing test programs for a document" + "\n";assertEquals("wrong contents: line", correctline, output.toString());
错误是
我很难弄清楚如何测试我自己创建并导入到Project中的目录。File file = new File(ExplorerView.class.getResource("/ExplorerViewTestFolder"));ExplorerView explorer = new ExplorerView();
Edit2:改为
@Tes
我想要创建一个新的assertEquals,它为预期和实际输入一个自定义pojo。我将如何扩展assertEquals of JUnit library
我能做的是实现一个比较方法,它返回一个布尔值,并将它作为assertEquals甚至assertTrue的输入,但是创建自己的assertEquals