Skip to content

Commit

Permalink
[anonymous-obj-casting] renaming test methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sk1418 committed May 9, 2024
1 parent c568ce4 commit 0791787
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface Printable {
* If we use an anonymous object as the return value of a private method,
* its members can still be accessed
*/
class PlayerService() {
class PlayerService {
private fun giveMeAPlayer() = object {
val name = "Kai"
val gamePlayed = 6L
Expand Down Expand Up @@ -79,7 +79,7 @@ class AnonymousObjectsUnitTest {
}

@Test
fun `when anonymous object with a supertype, the explict casting is not required`() {
fun `when anonymous object with a supertype, explict casting isn't required`() {
fun docTitleToUppercase(doc: Doc) = doc.title.uppercase()

val article = object : Doc(title = "A nice article", author = "Kai", words = 420) {
Expand All @@ -89,7 +89,7 @@ class AnonymousObjectsUnitTest {
}

@Test
fun `when anonymous object of Any, the explict casting does not work`() {
fun `when anonymous object of Any, explict casting doesn't work`() {

// the class
data class Player(
Expand Down

0 comments on commit 0791787

Please sign in to comment.