Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

Given When Then - Refactoring to a Kotlin DSL

Автор: Pairing with Duncan

Загружено: 2025-06-20

Просмотров: 868

Описание:

Software projects work better when the development team and business stakeholders agree on the behaviour of the system that they are building. Tests are a good way to share this specification, but only if all parties can understand them.

The Given When Then syntax of Cucumber tests is designed to be readable by normal people and interpreted by programmers. That interpretation by programmers is tedious though, so today we will look refactoring some Kotlin tests into a simple Given When Then domain specific language.

In this episode, I discuss the importance of aligning development teams and business stakeholders on software behavior using tests. I introduce the Given-When-Then syntax of Cucumber tests and show how to refactor Kotlin tests into a readable and simple domain-specific language (DSL). Watch as I dive into test scenarios, address common issues, and refactor code to achieve self-documenting and business-friendly tests, ensuring everyone can understand and agree on the system's behavior.

00:00:31 Look at our current tests
00:01:01 How to sense that things are not being saved?
00:02:47 IntelliJ import bug
00:04:14 Never trust a test you haven't seen fail
00:04:57 Now What about Given When Then
00:05:34 Given is the identity function on the initial test state
00:06:11 When and Then are let
00:07:30 IntelliJ crash
00:08:33 Use our Given When Then in another test
00:09:36 When is setup a Given not a When?
00:11:36 Make a Fixture for more complicated Givens
00:13:01 Some final readability improvements
00:16:20 Is this readable by our stakeholders?

There is a playlist of TDD Gilded Rose episodes -    • Test Driven Gilded Rose in Kotlin  

I get lots of questions about the test progress bar. It was written by the inimitable @dmitrykandalov. To use it install his Liveplugin (https://plugins.jetbrains.com/plugin/...) and then this gist https://gist.github.com/dmcg/1f56ac39...

If you like this video, you’ll probably like my book - Java to Kotlin, A Refactoring Guidebook (http://java-to-kotlin.dev). It's about far more than just the syntax differences between the languages - it shows how to upgrade your thinking to a more functional style.

Given When Then - Refactoring to a Kotlin DSL

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

Kotlin vs Cucumber for Acceptance Test Specifications

Kotlin vs Cucumber for Acceptance Test Specifications

Kotlin TDD - New Project and First Stories

Kotlin TDD - New Project and First Stories

07. 🚀 HTML Heading Tags Explained Bangla | H1–H6 SEO & Structure Tutorial

07. 🚀 HTML Heading Tags Explained Bangla | H1–H6 SEO & Structure Tutorial

Coroutines: Concurrency in Kotlin

Coroutines: Concurrency in Kotlin

Down with Context Receivers - Migrating to Context Parameters

Down with Context Receivers - Migrating to Context Parameters

19 лучших практик Flutter для приложений профессионального уровня (руководство 2025 г.)

19 лучших практик Flutter для приложений профессионального уровня (руководство 2025 г.)

Синьор 1С: 10 привычек, без которых ты не вырастешь

Синьор 1С: 10 привычек, без которых ты не вырастешь

Simplify Your Tests by Hiding Side Effects

Simplify Your Tests by Hiding Side Effects

Я в опасности

Я в опасности

Неудобная ПРАВДА про мыльный пузырь AI

Неудобная ПРАВДА про мыльный пузырь AI

Typst: Современная замена Word и LaTeX, которую ждали 40 лет

Typst: Современная замена Word и LaTeX, которую ждали 40 лет

120 МИЛЛИАРДОВ: КТО и Зачем создал БИТКОИН? Тайна Сатоши Накамото

120 МИЛЛИАРДОВ: КТО и Зачем создал БИТКОИН? Тайна Сатоши Накамото

The Windows 11 Disaster That's Killing Microsoft

The Windows 11 Disaster That's Killing Microsoft

Сисадмины больше не нужны? Gemini настраивает Linux сервер и устанавливает cтек N8N. ЭТО ЗАКОННО?

Сисадмины больше не нужны? Gemini настраивает Linux сервер и устанавливает cтек N8N. ЭТО ЗАКОННО?

Write Better Tests with the Screenplay Pattern

Write Better Tests with the Screenplay Pattern

Внедрение зависимостей — это не про фреймворки, это про «швы» (или «стыки»).

Внедрение зависимостей — это не про фреймворки, это про «швы» (или «стыки»).

Checkout Kata in Kotlin - Part 1 - TDD

Checkout Kata in Kotlin - Part 1 - TDD

ВСЕ накопители ДАННЫХ: объясняю за 8 минут

ВСЕ накопители ДАННЫХ: объясняю за 8 минут

Бизнес-логика в dataclass, pydantic, attrs-классах или в обычных классах? ООП в Python

Бизнес-логика в dataclass, pydantic, attrs-классах или в обычных классах? ООП в Python

LLM и GPT - как работают большие языковые модели? Визуальное введение в трансформеры

LLM и GPT - как работают большие языковые модели? Визуальное введение в трансформеры

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: infodtube@gmail.com