When using the MVVM template to structure your WPF application, you should get all your business logic from View and code-behind files. If the presentation itself is correctly executed, there will be a simple facade with data binding and command bindings to the ViewModel classes in which the magic happens.
One of the key advantages of structuring your applications using the MVVM template is that you test your code correctly at the ViewModel level, and therefore you can unit test the main parts of your system. However, there is still the possibility of errors in the presentation. For instance. "Does this button actually launch this particular function with the expected parameter?" Etc.
What could ideally be done with functionality in a view regarding unit testing? Assuming you fix it and don’t spend time checking it? Or do I also have tests for this? How to create them? ..
source
share