data class ParameterValue<T : Any>(val name: String, val value: T)
class TestCase : ShouldSpec({
should("consider them different") {
ParameterValue("Test Param", "value") shouldNotBeEqualToComparingFields
ParameterValue("Test Param", "well well")
}
})
shouldBeEqualToComparingFields shows the same behaviour. If shouldBe is used or value is replaced with a regular String in the class definition the test works.
Using Kotest 5.8.1
The following test fails:
shouldBeEqualToComparingFields
shows the same behaviour. IfshouldBe
is used or value is replaced with a regular String in the class definition the test works.