TDD with CAB

Topics: CAB & Smart Client Software Factory
Nov 19, 2005 at 9:47 AM
originally posted by: eichert12

Can someone provide an overview of what the process looks like when using TDD to develop UI's using CAB? If it fits into an MVP like approach feel free to use that terminology as I'm familiar with the approach of developing UI in a test driven fashion. Does CAB "feel" similar?
Nov 19, 2005 at 10:30 AM
originally posted by: BradWilsonMSFT

We have done TDD with MVP with great success, using CAB. I suppose I should put that on the list of the things we should blog about more fully. :)

We tend to follow the "Humble Dialog Box" approach of Michael Feathers; that is, defining an interface for the view, using a mock view, and testing the presenter by seeing the results on the mock view. Then you make a full fledged (non-TDDd) view that has solely GUI code in your app that uses the fully tested presenter.

Our views generally will create presenters as needed. The easiest way is to just new them up yourself in the view constructor.
Nov 19, 2005 at 1:51 PM
originally posted by: eichert12

I'd love to see more examples and blog posts talking about using MVP along with CAB to TDD GUI "stuff". Forgive the ignorant question but is the full fledged view that you talk about a "SmartPart" in CAB speak?

I enjoyed the basic example that you and Peter provided in your Code Camp slides & downloads. So, in summary I'd push a blog post about MVP, CAB, and TDD to the top of your "to blog list"! :-)