我想创建一个单元测试方法。Java版本为1.6。
@Test
public void TestCreateHtml() throws IOException{
final File output = parser.createHtml();
final File expected = new File("src/main/resources/head.jsp");
assertEquals("The files differ!", FileUtils.readLines(expected), FileUtils.readLines(output));
}
这个测试方法不起作用。两个文件的内容相同,但它们有不同数量的空格。
我该如何忽略空格?