WPF MVVM Unit Tests for the ViewModel? [closed]

2019-03-11 17:45发布

问题:

I keep reading about the benefits of using MVVM, especially for unit testing. So, now I need to write unit tests for my ViewModel. Does anyone have any examples of this? Should I just generate the unit tests using VS2008 and select those tests that appear important?

回答1:

Josh Smith unit tests one here. Hope that is what you are looking for.



回答2:

The ViewModel sample of the WPF Application Framework (WAF) shows how the ViewModel can be tested via the unit test framework.