Kotlin DSL: Theory and Practice
summary
Kotlin DSL: theory and practice explains how Kotlin’s language features can be used to build domain-specific languages to simplify writing and maintaining tests. It describes tools and techniques (Kotlin DSLs replacing builders and static methods) applied to testing a resource-planning module, and walks from designing an ideal test to implementing and running clear, concise tests in Kotlin.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 2:07DSL basics and motivation
- 8:45DSL vs general languages
- 10:49Kotlin DSL advantages
- 12:37Ideal DSL design
- 14:19Kotlin DSL tools
- 16:51Lambda with context
- 20:46Singleton and invoke
- 22:51Testing with DSL
- 27:35Destructuring declarations
- 29:20Type aliases and matrices
- 30:27Extension functions
- 32:15Infix functions
- 34:46DSL context control
- 37:01DSL pitfalls and fixes
- 43:05DSL design best practices
- 48:32Q&A
