더북(TheBook)
data class ToDoListOwner(override val name: String):
        DdtActor<ZettaiActions>() { 

    val user = User(name) 
  
    fun `can see #listname with #itemnames`(
                listName: String,
                expectedItems: List<String>) =

        step(listName, expectedItems) { 

            val list = getToDoList(user, ListName(listName)) 
 
            expectThat(list) 
                    .isNotNull()
                    .itemNames
                    .containsExactlyInAnyOrder(expectedItems)
            }
    private val Assertion.Builder<ToDoList>.itemNames
            get() = get { items.map { it.description } }
    }
신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.