[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
|
package net.kemitix.s3thorp
|
||||||
|
|
||||||
|
import java.io.File
|
||||||
|
|
||||||
import org.scalatest.FunSpec
|
import org.scalatest.FunSpec
|
||||||
|
|
||||||
class LocalFileStreamSuite extends FunSpec with LocalFileStream {
|
class LocalFileStreamSuite extends FunSpec with LocalFileStream {
|
||||||
|
@ -7,9 +9,9 @@ class LocalFileStreamSuite extends FunSpec with LocalFileStream {
|
||||||
describe("streamDirectoryPaths") {
|
describe("streamDirectoryPaths") {
|
||||||
var uploadResource = Resource(this, "upload")
|
var uploadResource = Resource(this, "upload")
|
||||||
it("should find all files") {
|
it("should find all files") {
|
||||||
val result: List[String] = streamDirectoryPaths(uploadResource).toList
|
val result: Set[String] = streamDirectoryPaths(uploadResource).toSet
|
||||||
.map(x=>uploadResource.toPath.relativize(x.toPath).toString)
|
.map { x: File => uploadResource.toPath.relativize(x.toPath).toString }
|
||||||
assertResult(List("subdir/leaf-file", "root-file"))(result)
|
assertResult(Set("subdir/leaf-file", "root-file"))(result)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue