Path matchers should be implemented without a toFile()
conversion
#1272
Labels
assertions 🔍
Related to the assertion mechanisms within the testing framework.
enhancement ✨
Suggestions for adding new features or improving existing ones.
Milestone
At the moment, most of the matchers for
java.nio.file.Path
are implemented using matchers forjava.io.File
:This, unfortunately, makes these matchers completely unusable with any file system except the default one. For example, if a given
Path
is obtained from aZipFileSystem
, this matcher will fail withUnsupportedOperationException
.Ideally matchers for
Path
values should be implemented using nativePath
operations, for example, checking notpath.toFile().exists()
butjava.nio.file.Files.exists(path)
.The text was updated successfully, but these errors were encountered: