fix up tests to handle new stream return types

This commit is contained in:
Paul Campbell 2019-05-24 07:52:36 +01:00
parent a5311fec72
commit 4cff0dd0c9
2 changed files with 13 additions and 13 deletions

View file

@ -27,7 +27,7 @@ class ActionGeneratorSuite
matchByKey = Some(theRemoteMetadata) // remote exists
)
it("do nothing") {
val expected = List.empty // do nothing
val expected = List(DoNothing(theFile.remoteKey))
val result = invoke(input)
assertResult(expected)(result)
}

View file

@ -27,9 +27,9 @@ class S3MetaDataEnricherSuite
)
val theRemoteMetadata = RemoteMetaData(theRemoteKey, theHash, lastModified)
it("generates valid metadata") {
val expected = S3MetaData(theFile,
val expected = Stream(S3MetaData(theFile,
matchByHash = Set(theRemoteMetadata),
matchByKey = Some(theRemoteMetadata))
matchByKey = Some(theRemoteMetadata)))
val result = getMetadata(theFile)
assertResult(expected)(result)
}
@ -44,9 +44,9 @@ class S3MetaDataEnricherSuite
)
val theRemoteMetadata = RemoteMetaData(theRemoteKey, theHash, lastModified)
it("generates valid metadata") {
val expected = S3MetaData(theFile,
val expected = Stream(S3MetaData(theFile,
matchByHash = Set(theRemoteMetadata),
matchByKey = Some(theRemoteMetadata))
matchByKey = Some(theRemoteMetadata)))
val result = getMetadata(theFile)
assertResult(expected)(result)
}
@ -61,9 +61,9 @@ class S3MetaDataEnricherSuite
)
val otherRemoteMetadata = RemoteMetaData(otherRemoteKey, theHash, lastModified)
it("generates valid metadata") {
val expected = S3MetaData(theFile,
val expected = Stream(S3MetaData(theFile,
matchByHash = Set(otherRemoteMetadata),
matchByKey = None)
matchByKey = None))
val result = getMetadata(theFile)
assertResult(expected)(result)
}
@ -76,9 +76,9 @@ class S3MetaDataEnricherSuite
byKey = Map()
)
it("generates valid metadata") {
val expected = S3MetaData(theFile,
val expected = Stream(S3MetaData(theFile,
matchByHash = Set.empty,
matchByKey = None)
matchByKey = None))
val result = getMetadata(theFile)
assertResult(expected)(result)
}
@ -101,9 +101,9 @@ class S3MetaDataEnricherSuite
val theRemoteMetadata = RemoteMetaData(theRemoteKey, oldHash, lastModified)
val otherRemoteMetadata = RemoteMetaData(otherRemoteKey, theHash, lastModified)
it("generates valid metadata") {
val expected = S3MetaData(theFile,
val expected = Stream(S3MetaData(theFile,
matchByHash = Set(otherRemoteMetadata),
matchByKey = Some(theRemoteMetadata))
matchByKey = Some(theRemoteMetadata)))
val result = getMetadata(theFile)
assertResult(expected)(result)
}
@ -123,9 +123,9 @@ class S3MetaDataEnricherSuite
)
val theRemoteMetadata = RemoteMetaData(theRemoteKey, oldHash, lastModified)
it("generates valid metadata") {
val expected = S3MetaData(theFile,
val expected = Stream(S3MetaData(theFile,
matchByHash = Set.empty,
matchByKey = Some(theRemoteMetadata))
matchByKey = Some(theRemoteMetadata)))
val result = getMetadata(theFile)
assertResult(expected)(result)
}