data class DataSample(val name: String, val exec: () -> Unit = {})
I am trying to understand why the following test would fail:
@Test
fun `testing data fails`() {
val dataOne = DataSample("the_same") {
}
val dataTwo = DataSample("the_same") {
}
assertEquals(dataOne, dataTwo)
}
and the following would pass:
@Test
fun `testing data pass`() {
val dataOne = DataSample("the_same")
val dataTwo = DataSample("the_same")
assertEquals(dataOne, dataTwo)
}
The test will pass when the lambda is omitted and it fails when one is provided.