Quantcast
Channel: Caliburn.Micro: Xaml Made Easy
Viewing all articles
Browse latest Browse all 1760

New Post: Unit Testing the View Model

$
0
0
You could always have your own method call in the OnViewLoaded() that does all of the logic.
protected override OnViewLoaded()
{
     MyLogic();
}

public void MyLogic()
{
     //Do stuff
}
You can then unit test MyLogic.
You should also be able to use ViewModelBinder.Bind(ViewModel, view, context). It calls AttachView() which has the handler that calls OnViewLoaded().

Viewing all articles
Browse latest Browse all 1760

Trending Articles