Re: Unit tests and parameter validation
Adam Sroka <[email protected]>
| Newsgroups | gmane.comp.programming.test-driven-development |
|---|---|
| Message-ID | <CALaPUVdht4mJvmZNubNxbCdzf_77msK4DBFj6UH1rDfRAQWy9Q@mail.gmail.com> |
I've seen Ward Cunningham and Kent Beck, both widely regarded as the inventors of TDD, code, and neither of them followed strict "outside-in" semantics. It must at least be possible that you could create a simple design without doing that. On Friday, October 18, 2013, Michal Svoboda wrote: > ** > > > Eb wrote: > > Curious how if this changes if one develops inside out. > > Your probability increases that you develop the wrong thing. :) > > On the original point, if your guards are mostly about null, then you > can annotate your stuff with @Nonnull (or similar if your language > supports it). This then makes the contract more like a strong type > system and violations can be likely caught by static analysis tools. > > Michal > >