[localfilestream] Compare test files within a Set (#11)
Fixes #10 * [localfilestream] Compare test files within a Set Removes issue of files being read in different orders. * [localfilestream] add missing parameter type
This commit is contained in:
parent
e834702923
commit
74afb288cc
1 changed files with 5 additions and 3 deletions
|
@ -1,5 +1,7 @@
|
|||
package net.kemitix.s3thorp
|
||||
|
||||
import java.io.File
|
||||
|
||||
import org.scalatest.FunSpec
|
||||
|
||||
class LocalFileStreamSuite extends FunSpec with LocalFileStream {
|
||||
|
@ -7,9 +9,9 @@ class LocalFileStreamSuite extends FunSpec with LocalFileStream {
|
|||
describe("streamDirectoryPaths") {
|
||||
var uploadResource = Resource(this, "upload")
|
||||
it("should find all files") {
|
||||
val result: List[String] = streamDirectoryPaths(uploadResource).toList
|
||||
.map(x=>uploadResource.toPath.relativize(x.toPath).toString)
|
||||
assertResult(List("subdir/leaf-file", "root-file"))(result)
|
||||
val result: Set[String] = streamDirectoryPaths(uploadResource).toSet
|
||||
.map { x: File => uploadResource.toPath.relativize(x.toPath).toString }
|
||||
assertResult(Set("subdir/leaf-file", "root-file"))(result)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue