types icon indicating copy to clipboard operation
types copied to clipboard

📝 Rename `actual` properties in code samples

Open LVMVRQUXL opened this issue 1 year ago • 0 comments

📝 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 = "[email protected]"
val address: EmailAddress = EmailAddress.orThrow(text)
val actual = "$address" // or address.toString()
assertEquals(expected = text, actual)

// After
val text = "[email protected]"
val address: EmailAddress = EmailAddress.orThrow(text)
val addressAsString = "$address" // or address.toString()
assertEquals(expected = text, addressAsString)

LVMVRQUXL avatar Dec 20 '24 07:12 LVMVRQUXL