Unit Testing in .NET Core Online Course

Unit Testing in .NET Core Online Course

Unit Testing in .NET Core Online Course

This course focuses on writing effective unit tests in C# using NUnit and xUnit frameworks. You’ll learn core unit testing concepts, best practices, and how to apply them in real-world scenarios. Through hands-on examples, the course demonstrates unit testing in .NET Core web applications with EF Core and extends to building N-Tier applications with .NET 6. By the end, you’ll have a strong foundation in unit testing and the practical skills to implement it in professional development projects.

Who should take this Course?

The Unit Testing in .NET Core Online Course is designed for .NET developers, software engineers, and QA professionals who want to ensure code reliability, maintainability, and performance through effective testing practices. It is equally valuable for students, beginner programmers, and aspiring software testers looking to gain hands-on experience with unit testing frameworks in .NET Core to write cleaner, bug-free, and production-ready code.

What you will learn

  • Learn unit testing from scratch
  • Learn to set up and use the NUnit and xUnit test framework
  • Write mocks with Mocking Framework (MOQ)
  • Explore unit tests and how they are written
  • Run and debug unit tests
  • Implement unit testing in N-tier real-world web application project using xUnit

Course Outline

Introduction to the Course

  • Welcome
  • Manual Testing Overview
  • Advantages of Automated Testing
  • Tools Needed
  • Types of Tests
  • Testing Pyramid
  • Logical Phase of an Automated Test

First Unit Test

  • .NET 6 Update - Nullable
  • Create Project
  • Create MSTest Project
  • First Unit Test
  • Failed Test Example

Unit Testing

  • Create NUnit Project
  • First NUnit Test
  • Debug and Assert
  • Assignment 1 - Odd Number Checker
  • Assignment 1 Solution - Odd Number Checker
  • Assertion Model
  • Testing Multiple Values
  • Combine Unit Test with Expected Result
  • Asserting Doubles
  • Asserting String Values
  • String Assert Helper Methods
  • Asserting Null Values
  • Global Initialization for Class

NUnit Testing – Advance Concepts

  • Asserting Collections
  • Collections Helper Method
  • Range Assert
  • Multiple Assert
  • Working with Exceptions
  • Exceptions without Message
  • Set Up Inheritance
  • Assert Object Type
  • Assignment 2 - Grading Calculator Part 1
  • Assignment 2 - Grading Calculator Part 1 Solution
  • Assignment 2 - Grading Calculator Part 2
  • Assignment 2 - Grading Calculator Part 2 Solution
  • Assignment 3 - Fibo Series
  • Assignment 3 - Fibo Series Solution

MOQ with Unit Testing

  • Set Up Bank Account Class
  • Setting Up Logger Class
  • Integration Test Demo
  • Unit Test with Fake Logger
  • Mocking Overview
  • MOQ in Action
  • Missing MOQ
  • Setting Up LogBook Withdrawal
  • MOQ Setup with Conditional Return
  • MOQ Setup Default Return Value
  • MOQ Evaluate the Return Value
  • MOQ and Out Parameters
  • MOQ and Ref
  • MOQ Default Return Values
  • MOQ Properties
  • MOQ Callbacks
  • MOQ Verification

xUnit

  • Create xUnit Project
  • xUnit Comparison
  • xUnit Calculator Part 1
  • xUnit Calculator Part 2
  • Assignment 4 - Grading Calculator
  • Assignment 4 - Grading Calculator xUnit Solution
  • Assignment 5 - Fibo Series xUnit
  • Assignment 5 - Fibo Series xUnit Solution
  • MOQ and xUnit
  • Customer xUnit
  • Assignment 6 - Bank Account xUnit

Real-World Example - NUnit

  • Set Up Main Project
  • Bongo Project Code Overview
  • Bongo Models Date Checker Part 1
  • Bongo Models Date Checker Part 2
  • Set Up Data Access Unit Test Project
  • In-Memory Database and Unit Testing
  • Data Access Unit Tests
  • Data Access Unit Tests Bugs and Pitfalls
  • Set Up Bongo Core Unit Test Project
  • Bongo Core MOQ Setup and GetAllBooking Test
  • Bongo Core Exception Unit test
  • Bongo Core Save Booking Setup
  • Bongo Core Save Booking Unit Test
  • Bongo Core Return Code TestCase
  • Bongo Core Separating Unit Tests
  • Bongo Web Test Project Setup
  • Bongo Web Index Action Method Unit Test
  • Bongo Web Checking View Name
  • Bongo Web Controller Unit Tests

Reviews

No reviews yet. Be the first to review!

Write a review

Note: HTML is not translated!
Bad           Good

Tags: Unit Testing in .NET Core Online Course, Unit Testing in .NET Core Course, Unit Testing in .NET Core Free Test, Unit Testing in .NET Core MCQ, Unit Testing in .NET Core Free Course,