Good resources for unit testing with MVVM

I'm fairly new to WPF and MVVM, but I understand the basics. The problem I am facing is finding good resources to learn unit testing with MVVM. I am new to unit testing.

Someone can recommend some good resources, be it blogs, videos, or even books.

+4
source share
2 answers

The topic has been widely discussed here:

https://stackoverflow.com/questions/37359/what-c-sharp-mocking-framework-to-use

WPF Unit Testing Framework

You can find many similar questions in the list of related questions.

Arrange, Act Assert is useful for structuring your unit tests for better readability. http://www.arrangeactassert.com/why-and-what-is-arrange-act-assert/

You mentioned that you are new to unit testing. I would advise reading a few free books on the discussion of the topic as a whole in order to get a good sense of unit testing. After all, unit tests are independent of the structure used in the project, because you must test individual classes, methods, and not entire components.

Of course, reading a good book is always worth it:

http://www.amazon.com/gp/search/ref=sr_kk_1?rh=i%3Astripbooks%2Ck%3Atest+driven+development&keywords=test+driven+development&ie=UTF8&qid=1344460674

MSDN Magazine has great articles on unit testing:

http://social.msdn.microsoft.com/Search/en-US?query=unit%20testing&Refinement=118&ac=8

See: http://msdn.microsoft.com/en-us/magazine/dd419663.aspx for an example MVVM application with unit tests.

That should be enough to get started.

+3
source

The art of unit testing is a good book for you. And Moq for mock structure

+2
source

All Articles