[reactives3clienttest] inline results

This commit is contained in:
Paul Campbell 2019-05-09 23:08:35 +01:00
parent 7593da9ce7
commit 674e88d802

View file

@ -19,8 +19,7 @@ class ReactiveS3ClientTest extends FunSpec {
val expectedLastModified = Instant.now val expectedLastModified = Instant.now
new ReactiveS3Client { self: S3Client => { new ReactiveS3Client { self: S3Client => {
it("should return Some(expected values)") { it("should return Some(expected values)") {
val result: Option[(String, Instant)] = invoke(self) assertResult(Some((expectedHash, expectedLastModified)))(invoke(self))
assertResult(Some((expectedHash, expectedLastModified)))(result)
} }
} }
override def s3Client: S3CatsIOClient = new S3CatsIOClient with UnderlyingS3AsyncClient { override def s3Client: S3CatsIOClient = new S3CatsIOClient with UnderlyingS3AsyncClient {
@ -36,8 +35,7 @@ class ReactiveS3ClientTest extends FunSpec {
describe("when throws NoSuchKeyException") { describe("when throws NoSuchKeyException") {
new ReactiveS3Client { self: S3Client => new ReactiveS3Client { self: S3Client =>
it("should return None") { it("should return None") {
val result = invoke(self) assertResult(None)(invoke(self))
assertResult(None)(result)
} }
override def s3Client: S3CatsIOClient = new S3CatsIOClient with UnderlyingS3AsyncClient { override def s3Client: S3CatsIOClient = new S3CatsIOClient with UnderlyingS3AsyncClient {
override def headObject(headObjectRequest: HeadObjectRequest): IO[HeadObjectResponse] = override def headObject(headObjectRequest: HeadObjectRequest): IO[HeadObjectResponse] =