Toehold Test

1 · Jesse Wilson · Feb. 17, 2019, 4:36 a.m.
Let’s write a small class that has potential to grow. data class ZipCode(val code: String) { init { require(code.matches(Regex("""\d{5}"""))) { "not a zip code: $code" } } } Should you write a unit test for this? Turbo test-driven developers do because they obsess over test coverage and test everything!...