Get View + ViewModel from Caliburn.Micro in unit tests
We're using Caliburn.Micro to do all the magic of kickstarting our Silverlight app.
I'd like to have a play with testing an initialised view being hosted by the Silverlight开发者_Python百科 Unit Testing Framework's TestPanel, but (without a deep dive) I don't know how to get at the view.
Does anyone know the magic to pull an initialised View + ViewModel out of Caliburn?
Check out white for doing automated UI testing :)
Just as an aside, you can get an instance of your view that Caliburn.Micro attaches, by overriding the OnViewLoaded
or AttachView
method in your view model, which is part of the Screen
type.
精彩评论