TDD - User Interface Flashcards
1
Q
How complex should be the UI definition code (HTML/C#)?
A
As simple and stupid as possible. Once this is harder to test.
2
Q
Where to develop as much user interface logic as possible?
A
In the page model. So that you can unit test it.
3
Q
How to segregate UI definition from the UI logic in legacy projects (e.g: WPF/Win UI)?
A
Using Model View ViewModel (MVVM).
4
Q
What’s a data annotation?
A
It’s a property that can be added to properties in order to extend their capabilities. E.g: [Required] and [StringLength(50)]