JUnit测试用例,检查文件是否已创建



我已经创建了一个简单的程序,它将通过缓冲写入器创建dat文件,并将一些数据写入该文件,现在请告知我可以通过哪些junit测试用例来检查文件是否在c:drive中创建,我使用的是junit 3,请告知。

File file = new File("c:/pathOfTheCreatedFile");
assertTrue(file.exists());
// TODO: read the file. Check that it contains what it's supposed to contain

最新更新