Testing your ViewModels while they're in development can help you create better apps. In this course, you'll learn how to use test-driven development (TDD) to build the ViewModels of your MVVM application.
When applying the MVVM pattern, the UI-logic is placed in ViewModels. A key advantage of such a ViewModel is that it is highly testable. In this course, WPF and MVVM: Test Driven Development of ViewModels, you'll learn the specifics of unit testing within MVVM. You'll discover how to create and run unit tests in Visual Studio with the popular testing framework xUnit, and how to write testable ViewModels by moving out typical dependencies like data access logic, event aggregator, modal dialogs and more. Next, you'll be taught how to mock/fake these dependencies in your unit tests by using the mocking library, Moq, as well as inject the dependencies into your ViewModels with a dependency injection framework called Autofac while running your application. Finally, you'll build and unit-test the ViewModels for an MVVM app called FriendStorage from 'empty class' to final by using test-driven development. By the end of this course, you'll understand how to develop your ViewModels through testing in order to create better apps than ever.
Course Overview Hi everyone! My name is Thomas Claudius Huber, and welcome to my course, WPF and MVVM: Test Driven Development of ViewModels. I am a Microsoft MVP for Windows development, and I have a passion for user interfaces. When I build a WPF application, I usually apply the MVVM pattern. The big advantage of the MVVM pattern is that you can test the complete code of your ViewModel with unit tests. This course is an introduction to test-driven development of ViewModels. Test-driven development means that you write your unit tests before you implement the actual logic. Some of the major topics that we will cover include creating unit tests in Visual Studio with xUnit, writing testable ViewModels by abstracting away dependencies, mocking dependencies with the Moq library, testing the ViewModels of the FriendStorage application, and also testing dialog interactions in MVVM. By the end of the course, you will know how to develop your ViewModels in a test-driven way to improve the quality and maintainability of your MVVM applications. For this course, no prior experience with unit testing and test-drive development is required. I hope you will join me on this journey to learn how to develop your ViewModels in a test-driven way with the course, WPF and MVVM: Test Driven Development of ViewModels at Pluralsight.