FileSubject to test actual file methods
kostasdrakonakis opened this issue · 1 comments
kostasdrakonakis commented
Truth does not provide FileSubject class in order to test actual methods from File
such as exists()
or isDirectory()
, e.t.c.
I believe that something like this should exist so we avoid currently doing something like this:
val jarDependencyDir = File(project.jarDir())
val artifact = File("$jarDependencyDir${File.separator}${artifactName()}")
assertThat(jarDependencyDir).isNotNull()
assert(jarDependencyDir.exists())
assert(jarDependencyDir.isDirectory)
assertThat(artifact).isNotNull()
assert(artifact.exists())
assert(artifact.isFile)
and replace it with this:
val jarDependencyDir = File(project.jarDir())
val artifact = File("$jarDependencyDir${File.separator}${artifactName()}")
assertThat(jarDependencyDir).isNotNull()
assertThat(jarDependencyDir).exists()
assertThat(jarDependencyDir).isDirectory()
assertThat(artifact).isNotNull()
assertThat(artifact).exists()
assertThat(artifact).isFile()