Udemy

Mastering Unit Testing in C#: A Beginner's Guide

Enroll Now
  • 632 Students
  • Updated 2/2023
3.6
(04 Ratings)
CTgoodjobs selects quality courses to enhance professionals' competitiveness. By purchasing courses through links on our site, we may receive an affiliate commission.

Course Information

Registration period
Year-round Recruitment
Course Level
Study Mode
Duration
0 Hour(s) 57 Minute(s)
Language
English
Taught by
Kenji Elzerman
Rating
3.6
(04 Ratings)

Course Overview

Mastering Unit Testing in C#: A Beginner's Guide

Learn the basics of C# unit testing with XUnit

While coding is fun and all, you need to make sure your code is always working. When something goes wrong customers usually blame the developers, but 7 out of 10 times it’s a wrong input but the customer. 2 out of 10 times it’s a logic problem (“well, didn’t see that one coming”), and 1 out 10 times its a developers error.

We, developers, cannot think for a customer or all the things a user can do. But we can make sure our code works as it should. Therefore, we should test our code. Not the application, but the logic that makes the application work. This is what we call ‘unit testing’.

In this course, I will explain and show you the basics of C# unit testing. I will start with the basic theory of unit testing and the difference between NUnit and XUnit, the two most test frameworks for C# and .NET. Other subjects are assertions, exception testing, and mocking are really important to know and explained. With some practical examples, I will show you how to use and implement them.

For this course, it is convenient if you have some experience with C# and .NET. You don't need any knowledge of unit testing, because that's what this course is all about.

Course Content

  • 4 section(s)
  • 11 lecture(s)
  • Section 1 Introduction
  • Section 2 About unit testing
  • Section 3 Creating unit tests with XUnit
  • Section 4 Conclusion

What You’ll Learn

  • Understand the idea behind unit testing, Learn the differences between NUnit and XUnit, Identify test cases, Create a basic unit test, Test exceptions with actions, Understand and implement mocking with MOQ

Reviews

  • H
    Haris Abbasi
    4.0

    The course is great for getting a low level - very basic idea about xUnit testing. There was only one exercise which wasn't even running.

  • 楚鈞 高
    3.0

    前面說明 XUnit 的部分簡單易懂,但是後面在說 Moq 的時候就有點看不懂在幹嘛,有點模糊帶過。

Start FollowingSee all

We use cookies to enhance your experience on our website. Please read and confirm your agreement to our Privacy Policy and Terms and Conditions before continue to browse our website.

Read and Agreed