withFailedTile
Adds a mock Tile that fails with the specified exception.
Return
This builder for method chaining
val testMosaic = mosaicBuilder()
.withFailedTile(MyTile, RuntimeException("Test error"))
.build()Content copied to clipboard
Parameters
tile
The Tile to mock
throwable
The exception to throw when the tile is retrieved
Adds a mock MultiTile that fails with the specified exception.
Return
This builder for method chaining
val testMosaic = mosaicBuilder()
.withFailedTile(UserTile, RuntimeException("User not found"))
.build()Content copied to clipboard
Parameters
K
The type of keys in the response
tile
The Tile to mock
throwable
The exception to throw when the tile's methods are called