Unit Testing .Net Core Applications with xUnit .net & MOQ
4.1 (448 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
2,528 students enrolled

Unit Testing .Net Core Applications with xUnit .net & MOQ

Mocking Techniques, Test Driven Development (TDD), and Unit Testing Legacy Code with xUnit.NET + Interview Questions
4.1 (448 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
2,528 students enrolled
Created by Aref K.
Last updated 5/2019
English
English [Auto]
Current price: $59.99 Original price: $99.99 Discount: 40% off
1 day left at this price!
30-Day Money-Back Guarantee
This course includes
  • 3.5 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Learn all the features and capabilities of xUnit .net
  • Learn writing unit tests using the Mocking technique and xUnit
  • Learn how to write unit tests for legacy (old) applications
  • Learn Test Driven Development (TDD) with xUnit
  • Learn how to measure test coverage
  • Take the interview questions and get ready for your next interiew
Course content
Expand all 39 lectures 03:30:49
+ Introduction
8 lectures 19:38

Get to know your instructor and underestand the goals of the course

Preview 01:24

XUnit .Net is a Free and Open Source unit testing framework for .Net and .Net Core applications. It can be used to test Xamarin applications as well.

Preview 01:05

Learn about the main features and design goals of XUnit .Net

Preview 02:21

Learn that how you will add the required NuGet packages and how you will write your first ever test method with XUnit

Writing your first Unit Test
06:27
Execute Unit Tests in Visual Studio
01:38
Execute Unit Tests via Command Line
02:26
Execute Unit Tests with ReSharper
02:31
Phases of Unit Testing
01:46
+ Asserts
8 lectures 52:02
The Assert Phase
02:40
Asserting numeric values
06:25
Asserting string values
09:32
Asserting boolean values as well as null values
04:45
Asserting Collections
10:28
Asserting a range of values
04:09
Asserting Exceptions
07:27
Asserting object types
06:36
+ Arrange Phase, and Managing Tests
5 lectures 40:41
Collections and Traits
07:32
Class Fixtures and IClassFixture
07:44
Constructors and IDisposable
07:14
Collection Definition
11:10
Parallel Execution of Tests
07:01
+ Data Driven Tests
5 lectures 23:53
Data Driven Tests in XUnit .net and the "Theory" attribute
04:10
Passing parameters to unit tests with inline attributes
06:50
Passing parameters to unit tests from external resources
04:46
Sharing test data across multiple unit test methods with custom attributes
03:23
+ Mocking and Unit Testing with MOQ & xUnit
7 lectures 37:05
Creating the xUnit Test Project
04:13
Writing our first test with Mock and xUnit
05:44
Testing when ModelState is invalid
02:55
Setting Up the Mocked Objects
07:49
Writing a Test with Arrange, Act and Assert Format
09:28
+ Unit Testing Legacy Code
3 lectures 20:40
The "Sprout Method" Technique
08:48
The "Sprout Class" Technique
10:22
+ More xUnit.net
1 lecture 04:47
Measuring Unit Test Coverage
04:47
+ Interview Questions
0 lectures 00:00

Interview around unit testing with C# and .NET Core

Unit Testing
4 questions
Requirements
  • C# programming beginner level
  • Visual Studio 2015, 2017, 2019 or Visual Studio for Mac
Description

Attention all .NET Core developers looking to develop new skills and take their career to the next level – this is the course to help you get there!


This is a focused course on the Unit Testing .NET Core 3 Projects with xUnit .net ; an open source unit testing tool for .Net Framework and .Net Core applications and the standard tool for unit testing C#, VB.NET and F# projects in Visual Studio

Being a proficient and confident user of this tool will allow you to execute key .NET core development tasks.

In this course, I will teach you:

  • the fundamentals of the xUnit .net ;

  • how to write effective and well-organised unit tests for your .NET core applications;

  • how to use data driven testing capabilities;

  • how to use mocking frameworks, including MoQ;

  • how to use test driven development (TDD) technique;

  • how to test legacy (old) code;

  • how to write unit tests for ASP.NET Core MVC applications



    No pre-requisite knowledge is required to complete this course, but a positive attitude and a willingness to learn is a must!

Questions are always welcome from students and can be asked in the Q&A section of the course. I endeavor to respond to these quickly so I can create an engaging learning environment for my students


Who this course is for:
  • C#, VB .Net or F# progrmmers
  • .NET Framework and/or ASP .NET developers
  • .NET Core programmers
  • Testers and QA Engineers
  • Xamarin developers