Unit testing custom controls in Silverlight
- by Hrvoje
I have several custom controls (some kind of frames for content and layout management, like wrap panel), and would like to write unit tests for them. It's hard to find any good examples except Silverlight control toolkit, which has some helper classes to do unit tests and it's quite complicated. For MVVM classes it's easy to write tests because they don't use SL dependency system and infrastructure.
Questions:
how to unit test DepedenyProperty, what do I need to test
how to test attached property
do I test bindings with theme or UserControl, like simple textblock content binding, or command/event binding in MVVM with UserControl
what else do I test in my custom controls, beside my business logic
any good tutorial to achieve tests like those in control toolkit
How do I start? Is SL controls toolkit only option for learning?
For testing framework i'm using one from control toolkit, and for continuus integration on TFS build server I planned to use Statlight (from codeplex). Any advice on that?