@DDT
fun `Only owners can see their lists`() = ddtScenario {
setUp {
tom.`starts with a list`(shoppingListName, shoppingItems)
adam.`starts with a list`(gardenListName, gardenItems)
}.thenPlay(
tom.`cannot see #listname`(gardenListName),
adam.`cannot see #listname`(shoppingListName)
)
}
}
첫 번째 스토리인 하나의 목록 보기를 Pesticide를 사용하는 DDT로 이렇게 번역할 수 있다. 이 테스트는 이전의 인수 테스트보다 조금 더 깔끔해졌고, 이제 도메인과 HTTP 프로토콜 양쪽에서 모두 실행된다.
IDE에서 테스트를 실행하면 다음과 같이 표시된다.