Mastering Unit Testing in C#: A Beginner's Guide
Kenji Elzerman
57:04
Description
Learn the basics of C# unit testing with XUnit
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
Who is this for?
More details
DescriptionWhile 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.
Who this course is for:
- This course is for beginners that have some experience with C# and want to learn unit testing.
- Advanced C# developers can use this course as a refreshment.
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.
Who this course is for:
- This course is for beginners that have some experience with C# and want to learn unit testing.
- Advanced C# developers can use this course as a refreshment.
User Reviews
Rating
Kenji Elzerman
Instructor's Courses
Udemy
View courses Udemy- language english
- Training sessions 11
- duration 57:04
- Release Date 2023/04/27