HOME > Development > Complete Guide to Unit Testing in .NET Core (NUnit XUnit)

Complete Guide to Unit Testing in .NET Core (NUnit XUnit)

  • Development
  • Feb 01, 2025
SynopsisComplete Guide to Unit Testing in .NET Core (NUnit & XUni...
Complete Guide to Unit Testing in .NET Core (NUnit XUnit)  No.1

Complete Guide to Unit Testing in .NET Core (NUnit & XUnit), available at $74.99, has an average rating of 4.53, with 88 lectures, based on 1229 reviews, and has 7288 subscribers.

You will learn about Learn unit testing from scratch What unit tests are for and how they are written How to set up and use the NUnit and XUnit test framework Run and Debug Unit Tests Write Mocks with Mocking Framework (MOQ) Implement unit testing in N-tier real world web application project using XUnit This course is ideal for individuals who are .NET developer who wants to build better quality software with fewer bugs or .NET developer who wants to learn unit testing or .NET developer who wants to see unit testing in real world application It is particularly useful for .NET developer who wants to build better quality software with fewer bugs or .NET developer who wants to learn unit testing or .NET developer who wants to see unit testing in real world application.

Enroll now: Complete Guide to Unit Testing in .NET Core (NUnit & XUnit)

Summary

Title: Complete Guide to Unit Testing in .NET Core (NUnit & XUnit)

Price: $74.99

Average Rating: 4.53

Number of Lectures: 88

Number of Published Lectures: 88

Number of Curriculum Items: 88

Number of Published Curriculum Objects: 88

Original Price: $94.99

Quality Status: approved

Status: Live

What You Will Learn

  • Learn unit testing from scratch
  • What unit tests are for and how they are written
  • How to set up and use the NUnit and XUnit test framework
  • Run and Debug Unit Tests
  • Write Mocks with Mocking Framework (MOQ)
  • Implement unit testing in N-tier real world web application project using XUnit
  • Who Should Attend

  • .NET developer who wants to build better quality software with fewer bugs
  • .NET developer who wants to learn unit testing
  • .NET developer who wants to see unit testing in real world application
  • Target Audiences

  • .NET developer who wants to build better quality software with fewer bugs
  • .NET developer who wants to learn unit testing
  • .NET developer who wants to see unit testing in real world application
  • “Production application can breakwith a simple change that was unexpectedto alter any other functionality” Sounds familiar right?! 

    Good news is, with well written unit test’s this would be a thing of the past.

    Automated testinghas been a buzz word for a while but many times developers struggle to find a course that covers the fundamentals of unit testing while implementing what they learned in a real world project! That is the main focus of this course.

    This course is all about writing effective unit tests using C# programming language and NUnit /XUnit as a unit testing framework. Along the way, we will learn the concepts related to unit testing. Today unit testing is an absolutelyrequired skill from any professional developer. Companies expect from developers to know how to write unit tests using best practices. This course will help you setup a solid foundation with a real world example and how unit testing could be done in a .NET Core Web application with EF Core.

    What is unit testing?

    UNIT TESTING is a type of software testing where individual units or components of a software are tested. The purpose is to validate that each unit of the software code performs as expected.

    Why learn unit testing?

    Why should I learn unit testing? Why spend extra time to write code to test? Is manual testing not sufficient? 

    These are pretty common questions and I will answer them all but most of the times manual testing is much more time consuming and it is not as through as unit test. Unit tests take time once to write and can be executed for free every time! 

    As application grows, the cost of manual testing grows exponentially. And manual testing will never give 100% confidence with all the edge cases.. Automated tests help you to catch the bugs while it is in development phase, because of which they would be easier to resolve.

    Will it help me with job?

    Many times, skills comes with that will that skill help me achieve professionally. Unit testing is a very valuable skill with the current development cycle. It is a must have skill in most organizations for senior developers.

    By end of this course you will have a solid foundation with unit testing. Along with a solid foundation we will implement what we learned in real world N-Tier web application with .NET 6 and EF Core.

    Course Curriculum

    Chapter 1: Introduction

    Lecture 1: Welcome

    Lecture 2: Manual Testing Overview

    Lecture 3: Advantages of automated testing

    Lecture 4: Udemy Review

    Lecture 5: Tools needed

    Lecture 6: Project resources

    Lecture 7: Types of test

    Lecture 8: Testing pyramid

    Lecture 9: Logical phase of an automated test

    Chapter 2: First Unit Test

    Lecture 1: Create Project

    Lecture 2: Create MSTest Project

    Lecture 3: First Unit Test

    Lecture 4: Failed Test Example

    Chapter 3: UNit Testing

    Lecture 1: Create NUnit Project

    Lecture 2: NUnit Update

    Lecture 3: First NUnit Test

    Lecture 4: Debug and assert

    Lecture 5: Assignment 1 – Odd Number Checker

    Lecture 6: Assignment 1 Solution – Odd Number Checker

    Lecture 7: Assertion Model

    Lecture 8: Testing multiple values

    Lecture 9: Combine Unit Test with Expected Result

    Lecture 10: Asseting Doubles

    Lecture 11: Asserting String Values

    Lecture 12: String Assert Helper Methods

    Lecture 13: Asserting Null Values

    Lecture 14: Global Initialization for Class

    Chapter 4: NUnit Testing – Advance Concepts

    Lecture 1: Asserting Collections

    Lecture 2: Collections Helper Method

    Lecture 3: Range Assert

    Lecture 4: Multiple Assert

    Lecture 5: Working with Exceptions

    Lecture 6: Exceptions without Message

    Lecture 7: Setup Inheritance

    Lecture 8: Assert Object Type

    Lecture 9: Assignment 2 – Grading Calculator Part 1

    Lecture 10: Assignment 2 – Grading Calculator Part 1 Solution

    Lecture 11: Assignment 2 – Grading Calculator Part 2

    Lecture 12: Assignment 2 – Grading Calculator Part 2 Solution

    Lecture 13: Assignment 3 – Fibo Series

    Lecture 14: Assignment 3 – Fibo Series Solution

    Chapter 5: MOQ with Unit Testing

    Lecture 1: Setup Bank Account Class

    Lecture 2: Setup Logger Class

    Lecture 3: Integration Test Demo

    Lecture 4: Unit Test with Fake Logger

    Lecture 5: Mocking Overview

    Lecture 6: MOQ in Action

    Lecture 7: Misuing MOQ

    Lecture 8: Setup LogBook Withdrawal

    Lecture 9: MOQ Setup with Conditional Return

    Lecture 10: MOQ setup default return value

    Lecture 11: MOQ evaluate the return value

    Lecture 12: MOQ and out parameters

    Lecture 13: MOQ and ref

    Lecture 14: MOQ default return values

    Lecture 15: MOQ Properties

    Lecture 16: MOQ Callbacks

    Lecture 17: MOQ Verification

    Chapter 6: XUnit

    Lecture 1: Create Xunit Project

    Lecture 2: XUnit Comparision

    Lecture 3: Xunit Calculator Part 1

    Lecture 4: Xunit Calculator Part 2

    Lecture 5: Assignment 4 – Grading Calculator

    Lecture 6: Assignment 4 – Grading Calculator Xunit Solution

    Lecture 7: Assignment 5 – Fibo Series XUnit

    Lecture 8: Assignment 5 – Fibo Series XUnit Solution

    Lecture 9: MOQ and Xunit

    Lecture 10: Customer XUnit

    Lecture 11: Assignment 6 – Bank Account XUnit

    Chapter 7: Real World Example – NUnit

    Lecture 1: Setup Main Project

    Lecture 2: Bongo Project Code Overview

    Lecture 3: Bongo Models Date Checker Part 1

    Lecture 4: Bongo Models Date Checker Part 2

    Lecture 5: Setup Data Access Unit Test Project

    Lecture 6: In Memory Database and Unit Testing

    Lecture 7: Data Access Unit Tests

    Lecture 8: Data Access Unit Tests Bugs and Pitfalls

    Lecture 9: Setup Bongo Core Unit Test Project

    Lecture 10: Bongo Core MOQ Setup and GetAllBooking Test

    Lecture 11: Bongo Core Exception Unit test

    Lecture 12: Bongo Core Save Booking Setup

    Lecture 13: 15 Bongo Core Save Booking Unit Test

    Lecture 14: 16 Bongo Core Return Code TestCase

    Lecture 15: 17 Bongo Core Seperating Unit Tests

    Lecture 16: 19 Bongo Web Test Project Setup

    Lecture 17: 20 Bongo Web Index Action Method Unit Test

    Lecture 18: 21 Bongo Web checking View Name

    Lecture 19: 22 Bongo Web Controller Unit Tests

    Instructors

  • Complete Guide to Unit Testing in .NET Core (NUnit XUnit)  No.2
    Bhrugen Patel
    Microsoft MVP | Passionate Software Architect
  • Rating Distribution

  • 1 stars: 6 votes
  • 2 stars: 14 votes
  • 3 stars: 113 votes
  • 4 stars: 452 votes
  • 5 stars: 644 votes
  • Frequently Asked Questions

    How long do I have access to the course materials?

    You can view and review the lecture materials indefinitely, like an on-demand channel.

    Can I take my courses with me wherever I go?

    Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don’t have an internet connection, some instructors also let their students download course lectures. That’s up to the instructor though, so make sure you get on their good side!