Laurent Thiebaud
02/18/2025, 1:34 PM@BeforeEach method, why does it fail to create the MyService in
@BeforeEach
fun setup(): Unit = declare { MyService() }
whereas with the following it is ok ?
@BeforeEach
fun setup(): Unit {
declare { MyService() }
}Laurent Thiebaud
02/18/2025, 3:11 PM@BeforeEach to return Unit, but fun setup(): Unit doesn't make it return Unit .
However the following works:
@BeforeEach
fun setup() = declare { MyService() }.let { }arnaud.giuliani
02/18/2025, 4:07 PMfun setup() { declare { MyService() } } ?Laurent Thiebaud
02/19/2025, 7:20 AM