aggregating things of interest from a Web/.NET perspective
Contents tagged with WPF
Testing the PropertyChanged event
Testing a ViewModel and it's properties may look quite easy at first. But ViewModels are quite treacherous to their nature. There's no guarantee that the value of a property in a unit test is the same … more
INotifyPropertyChanged - A remedy for the plague
I stumble over this nice little extension class the other day while visiting Google.Instead of passing around a hard coded string for NotifyPropertyChanged like this: private string firstName; … more
TDD in a WPF world - Testing the ViewModel
Here is a sketch of the basic principles I follow to make my ViewModels more testable:
I follow the following steps when designing the ViewModel above:
Create a prototype of the … more
TDD in a WPF world - The self injecting View
Occasionally, the ViewModel needs to communicate with the View. Most of the times, this is done with bindings. For i.e, activating and deactivating a control at a specific time is easily solved with a … more
TDD in a WPF world - Disconnecting the MessageBox
Starting TDD'ing our new ViewModel designed app, will soon get us cornered. There are a few pitfalls and hairy situations that will arise quite early on. But, they will mainly get there for one … more
TDD in a WPF World - Setting the scene
Two fundamental nessecities for testing our WPF applications are: Keep the user interface layer (Xaml) thin. Xaml is a bit trickier and more tedious to test than plain c#. I … more