Open
Description
📝 Description
actual
being a Kotlin keyword, we don't want to use it as a property declared in code samples present in the API reference. Instead, we should use a descriptive name of the value contained in the property.
// Before
val text = "contact@kotools.org"
val address: EmailAddress = EmailAddress.orThrow(text)
val actual = "$address" // or address.toString()
assertEquals(expected = text, actual)
// After
val text = "contact@kotools.org"
val address: EmailAddress = EmailAddress.orThrow(text)
val addressAsString = "$address" // or address.toString()
assertEquals(expected = text, addressAsString)