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.
junitテストケースを使用して、特定のファイルが指定された場所に存在するかどうかを確認する方法は?
以下をチェックするテストを作成できます。
new File(filePath).exists()
falseの場合は、例外をスローするだけです
ファイルクラスを確認する必要があります