Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个简单的程序,它将通过缓冲写入器创建 dat 文件并将一些数据写入该文件,现在请告知我可以拥有哪些 junit 测试用例,通过它我可以检查文件是否在 c: 驱动器中创建,我正在使用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