Information Technology
Hands on Training icon
Hands On Training
Hands on Training icon

Mocking with Moq 4 and xUnit

Course Cover
compare button icon

Course Features

icon

Duration

135 minutes

icon

Delivery Method

Online

icon

Available on

Downloadable Courses

icon

Accessibility

Desktop, Laptop

icon

Language

English

icon

Subtitles

English

icon

Level

Beginner

icon

Teaching Type

Self Paced

icon

Video Content

135 minutes

Course Description

Writing unit tests can be time-consuming, difficult, and slow if you don't know how to isolate the classes that you want from the rest. This course, mocking with Moq 4 & xUnit will teach you how to create mocks that you can use as dependencies for the classes you wish to test. You'll first learn how to set up mocked properties and methods to return certain values. Next, you will learn how to conduct behavior/interaction testing in order to verify that your classes interact correctly with each other. You'll also learn how to create mock exceptions and mock events, as well as other mocking techniques. This course will teach you how to use Moq to test your classes individually by creating and using mock objects.

Course Overview

projects-img

International Faculty

projects-img

Post Course Interactions

projects-img

Instructor-Moderated Discussions

projects-img

Case Studies, Captstone Projects

Skills You Will Gain

What You Will Learn

You'll learn how to create mocks and use them as dependencies to the classes you want to test

First, you'll discover how to configure mocked methods and properties to return specific values

Next, you'll learn how to perform behavior/interaction testing to check your classes are interacting correctly with their dependencies

Finally, you'll explore how to setup mock exceptions, mock events, and use additional mocking techniques

When you're finished with this course, you'll have the necessary knowledge to use Moq to unit test your classes in isolation by creating and using mock objects

Course Instructors

Author Image

Jason Roberts

Instructor

With over 15 years of experience in both frontend and backend software development, Jason Roberts is a freelance developer, trainer, and author. He holds a Bachelor of Science degree in computing, is...
Course Cover