views:

83

answers:

0

My specific question is when the viewmodel constructor is modeled after the MVVM-Light examples, like this one

    public MainViewModel()
{
    if (IsInDesignMode)
    {
        BackgroundBrush = new SolidColorBrush(Colors.Orange);
    }
    else
    {
        Messenger.Default.Register<Brush>(
            this, 
            true, 
            m => BackgroundBrush = m);

        ShutdownCommand
            = new RelayCommand(ShutdownService.RequestShutdown);
    }
}

Should test this? What should I test? Looks like I should test if the class is registered to listen for a message, and if it wires up a ShutdownCommand. My current issue is that ShutdownCommand is setup and calls what it is supposed to call. I also don't quite get TDD yet, so maybe I'm just asking all the wrong questions.