withFailedTile
Adds a mock Tile that fails with the specified exception.
Return
This builder for method chaining
mosaicBuilder()
.withFailedTile(MyTile, RuntimeException("Test error"))
.withMosaic { /* compose and assert here */}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
mosaicBuilder()
.withFailedTile(UserTile, RuntimeException("User not found"))
.withMosaic { /* compose and assert here */}Content copied to clipboard
Parameters
tile
The MultiTile to mock
throwable
The exception to throw when the tile's methods are called