Oleksandr Bashkatov
09/02/2021, 7:59 AMmockkObject(S3)
every { uploadObject(any(), any(), any()) } returns Unit
If I call S3.uploadObject()
from the test function it's mocked like a charm. But given integration tests this object method is called by other services and behavior is not stubbed.
Original object is
object S3 {
// some content
fun uploadObject(stream: InputStream, key: String, metadata: ObjectMetadata): Unit {}
}
Oleksandr Bashkatov
09/02/2021, 8:14 AM