We may earn an affiliate commission when you visit our partners.
Thomas Claudius Huber

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.

Read more

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.

Enroll now

What's inside

Syllabus

Course Overview
Introduction
Getting Started with Unit Testing
Writing Testable ViewModels
Read more
Mocking Dependencies with Moq
Testing and Implementing the Loading of Friends
Closing Tabs and Saving a Friend
Adding a New Friend
Deleting an Existing Friend
Interacting with Dialogs in MVVM

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Teaches students how to implement the MVVM pattern in WPF
Develops students' knowledge of unit testing using frameworks like xUnit and Moq
Covers the specifics of unit testing within MVVM, which is a key advantage of using the MVVM pattern
Suitable for learners with prior knowledge of WPF and MVVM

Save this course

Save WPF and MVVM: Test Driven Development of ViewModels to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in WPF and MVVM: Test Driven Development of ViewModels with these activities:
Review the basics of OOP and design patterns
OOP and design patterns are foundational concepts for MVVM applications. Reviewing them will strengthen your understanding and help you apply them effectively in this course.
Browse courses on OOP
Show steps
  • Read articles or books on OOP and design patterns
  • Practice creating and using design patterns in code
Attend a local meetup or conference on WPF and MVVM development
Networking events will allow you to connect with other developers, share knowledge, and learn about the industry.
Browse courses on WPF
Show steps
  • Find a relevant meetup or conference
  • Attend the event
  • Network with other attendees
Follow tutorials on how to test WPF and MVVM applications with Visual Studio
Following tutorials will help you quickly get started with unit testing in WPF and MVVM applications.
Browse courses on WPF
Show steps
  • Find suitable tutorials
  • Follow the tutorials and complete the exercises
Six other activities
Expand to see all activities and additional details
Show all nine activities
Review the book "Test-Driven Development with xUnit" by Roy Osherove
Reviewing this book will help you understand the principles and concepts of TDD using the xUnit testing framework, which is a key part of this course.
Show steps
  • Read Chapters 1-3 of the book
  • Practice writing unit tests using xUnit
Solve LeetCode problems related to mocking and dependency injection
Solving coding problems will help you improve your skills in mocking and dependency injection and prepare for technical interviews.
Browse courses on MOQ
Show steps
  • Find relevant LeetCode problems
  • Attempt to solve the problems
  • Review your solutions and learn from mistakes
Create a small WPF application with MVVM
Building a project will help you apply the concepts of test-driven development and MVVM to a real-world application.
Browse courses on WPF
Show steps
  • Create a new WPF application
  • Implement the MVVM pattern
  • Write unit tests for the ViewModels
Attend a workshop on unit testing WPF and MVVM applications
Attending a workshop will provide you with hands-on experience and in-depth knowledge on testing WPF and MVVM applications.
Browse courses on WPF
Show steps
  • Find a suitable workshop
  • Attend the workshop and participate actively
Write a blog post or tutorial on how to use Moq to mock dependencies
Creating content on mocking dependencies will help solidify your understanding of the concepts and enable you to share your knowledge with others.
Browse courses on MOQ
Show steps
  • Research the topic and gather information
  • Write the blog post or tutorial
  • Proofread and publish
Develop a library that provides unit testing utilities for WPF and MVVM applications
Developing a library will challenge you to apply your knowledge in a practical way and contribute to the community.
Browse courses on WPF
Show steps
  • Design the library's API and functionality
  • Implement the library
  • Test the library
  • Document the library
  • Publish the library

Career center

Learners who complete WPF and MVVM: Test Driven Development of ViewModels will develop knowledge and skills that may be useful to these careers:
Software Developer
Software Developers are responsible for designing, developing, and maintaining software applications. They work with a variety of programming languages and technologies to create software solutions that meet the needs of businesses and consumers. This course can help you build a strong foundation in unit testing, which is an essential skill for Software Developers. By learning how to write testable ViewModels, you'll be able to more effectively develop and maintain high-quality software applications.
QA Engineer
QA Engineers are responsible for ensuring the quality of software products. They play a critical role in the development process, working with developers and other stakeholders to identify and fix bugs. This course can help you build a strong foundation in unit testing, which is an essential skill for QA Engineers. By learning how to write testable ViewModels, you'll be able to more effectively identify and fix bugs in your code.
Test Automation Engineer
Test Automation Engineers are responsible for automating the testing of software applications. They work with a variety of testing tools and techniques to create automated tests that can help to improve the quality and efficiency of the testing process. This course can help you build a strong foundation in unit testing, which is an essential skill for Test Automation Engineers. By learning how to write testable ViewModels, you'll be able to more effectively create automated tests that can help to improve the quality and efficiency of your testing process.
Software Architect
Software Architects are responsible for designing and overseeing the development of software systems. They work with a variety of stakeholders to gather requirements, create system designs, and ensure that software systems are built to meet the needs of businesses and consumers. This course can help you build a strong foundation in unit testing, which is an essential skill for Software Architects. By learning how to write testable ViewModels, you'll be able to more effectively design and oversee the development of high-quality software systems.
Systems Analyst
Systems Analysts are responsible for analyzing and designing computer systems. They work with a variety of stakeholders to gather requirements, create system designs, and ensure that computer systems are built to meet the needs of businesses and consumers. This course can help you build a strong foundation in unit testing, which is an essential skill for Systems Analysts. By learning how to write testable ViewModels, you'll be able to more effectively analyze and design high-quality computer systems.
Technical Lead
Technical Leads are responsible for leading and mentoring software development teams. They work with a variety of stakeholders to gather requirements, create system designs, and ensure that software systems are built to meet the needs of businesses and consumers. This course can help you build a strong foundation in unit testing, which is an essential skill for Technical Leads. By learning how to write testable ViewModels, you'll be able to more effectively lead and mentor your team in the development of high-quality software systems.
Software Quality Assurance Analyst
Software Quality Assurance Analysts are responsible for ensuring the quality of software products. They work with a variety of stakeholders to identify and fix bugs, and to ensure that software products meet the needs of businesses and consumers. This course can help you build a strong foundation in unit testing, which is an essential skill for Software Quality Assurance Analysts. By learning how to write testable ViewModels, you'll be able to more effectively identify and fix bugs in your code, and to ensure that software products meet the needs of businesses and consumers.
User Experience Designer
User Experience Designers are responsible for designing and evaluating the user experience of software products. They work with a variety of stakeholders to gather requirements, create user interface designs, and ensure that software products are easy to use and enjoyable to use. This course can help you build a strong foundation in unit testing, which can be a valuable skill for User Experience Designers. By learning how to write testable ViewModels, you'll be able to more effectively design and evaluate the user experience of software products.
Product Manager
Product Managers are responsible for managing the development and launch of software products. They work with a variety of stakeholders to gather requirements, create product roadmaps, and ensure that software products meet the needs of businesses and consumers. This course can help you build a strong foundation in unit testing, which can be a valuable skill for Product Managers. By learning how to write testable ViewModels, you'll be able to more effectively manage the development and launch of high-quality software products.
Consultant
Consultants provide advice and guidance to businesses on a variety of topics, including software development. This course can help you build a strong foundation in unit testing, which can be a valuable skill for Consultants. By learning how to write testable ViewModels, you'll be able to more effectively provide advice and guidance to businesses on how to develop high-quality software products.
Technical Writer
Technical Writers are responsible for writing documentation for software products. They work with a variety of stakeholders to gather requirements, create user guides, and ensure that documentation is clear and easy to understand. This course can help you build a strong foundation in unit testing, which can be a valuable skill for Technical Writers. By learning how to write testable ViewModels, you'll be able to more effectively create documentation that is clear and easy to understand.
Researcher
Researchers are responsible for conducting research on a variety of topics, including software development. This course can help you build a strong foundation in unit testing, which can be a valuable skill for Researchers. By learning how to write testable ViewModels, you'll be able to more effectively conduct research on software development.
Educator
Educators are responsible for teaching students about a variety of subjects, including software development. This course can help you build a strong foundation in unit testing, which can be a valuable skill for Educators. By learning how to write testable ViewModels, you'll be able to more effectively teach students about software development.
Data Scientist
Data Scientists are responsible for collecting, analyzing, and interpreting data. They work with a variety of data sources to extract insights and make predictions. This course can help you build a strong foundation in unit testing, which can be a valuable skill for Data Scientists. By learning how to write testable ViewModels, you'll be able to more effectively collect, analyze, and interpret data.
Business Analyst
Business Analysts are responsible for analyzing and improving business processes. They work with a variety of stakeholders to gather requirements, create process designs, and ensure that business processes are efficient and effective. This course may be useful for Business Analysts who are interested in learning more about unit testing. By learning how to write testable ViewModels, you'll be able to more effectively analyze and improve business processes.

Reading list

We've selected ten books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in WPF and MVVM: Test Driven Development of ViewModels.
Provides an in-depth look at the C# programming language. It covers topics such as delegates, events, generics, and reflection.
Provides a set of principles and practices for designing software that is maintainable, extensible, and testable. It covers topics such as the SOLID principles, dependency injection, and hexagonal architecture.
Provides a deep dive into the Common Language Runtime (CLR), which is the foundation of the .NET Framework. It covers topics such as memory management, threading, and security.
Provides a comprehensive introduction to test-driven development (TDD) for .NET developers. It covers topics such as unit testing, integration testing, and mocking.
Provides a thorough introduction to the C# programming language, including its syntax, semantics, and features. It also includes a reference to the C# language specification.
Provides a comprehensive guide to dependency injection in .NET. It covers topics such as the principles of dependency injection, different types of dependency injection frameworks, and how to use dependency injection in real-world applications.
Provides a comprehensive introduction to domain-driven design (DDD). DDD software development approach that focuses on creating software that is closely aligned with the business domain.
This book, which is in its ninth edition, provides a comprehensive overview of C# programming for readers without prior programming experience, or for those who want a reference to the upcoming .NET Core 3. It includes both basic and advanced topics.
Provides a concise and practical guide to the C# programming language. It covers topics such as variables, data types, operators, control flow, methods, and classes.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Here are nine courses similar to WPF and MVVM: Test Driven Development of ViewModels.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2024 OpenCourser