Hi
I have a largish application that uses MVVM. The Model is mostly in a C++ DLL. The ViewModel is in C#, and I've tied my WPF controls to the ViewModel in the usual way.
The app is ready for integration testing. I can drive tests from within the application, but I'd like to move testing out into another process so I can minimize polluting the application with test stuff.
I'd like to write the test application myself in C# and WPF, but I'm a bit stuck as how to go about it.
Note: If there's a third party testing application for testing ViewModels inside a .Net application, I'd love to hear about that too!
I imagine Process.Start is the initial way in, but from there I'm lost.
Basically I need to let the application load up normally, create its Model as usual, and start the GUI, so I can't drive individual methods in isolation (unit test style). Then I would like to set and get my ViewModel properties as I do currently with my local tests.
I've looked at James McCafferey's MSDN 03/09 article on testing WPF apps, but it's geared towards testing the GUI (basically remotely pressing Buttons etc), something I want to get away from.
Is reflection the way in here? If so, how, bearing in mind I can't simply reflect onto an 'empty' ViewModel, it has to be connected to my Model for the VM properties to be testable.
Thanks in advance