Unit Testing C# Code – Tutorial for Beginners

Unit testing C# code – Tutorial for beginners
🔥 Get the complete C# unit testing course: http://bit.ly/2GBELxZ

Source Code: http://bit.ly/2yczFVf

Subscribe for more videos

00:00 What is Automated Testing
02:42 Benefits of Automated Testing
05:20 Types of Tests
09:22 Test Pyramid
12:18 The Tooling
15:13 Source Code
16:14 Writing Your First Unit Test
26:44 Testing All the Execution Paths
32:07 Refactoring With Confidence
34:24 Using NUnit in Visual Studio
38:25 What is Test-Driven Development
41:46 Course Structure
43:34 Summary



  1. Dear lord, if my lecturers were half as passionate about explaining these concepts in college… Great, no &*^#%, straight to the point! Love it! 😀

  2. Hello. Thank you for this course. I bought your course and really enjoy it. But I need more experience to write tests for real application such as CRUD based backend API's. You said 'I will create Integration testing Course', but I can't find it in your website. I will be very appreciate if you will create c# Integration Testing with real medium level project, Thanks.

  3. Been looking for something like this all day, it's all super basic and is just throwing exceptions or it's some crazy mess of tools. I can finally get to work on adding unit tests.

  4. Absolutely useless waste of time, as with the OOP course that I bought and did not learn anything new, at some points I would even correct you. Good luck and do normal courses, not superficial ones, don't be afraid, I won't ask for money back for the course.

  5. Hi! Bitly has blocked the link to the code and it's inaccessible now. Could you maybe provide a new/direct link? Thank you!

  6. The source code webpage shows 404 error. can you please attach a fresh new source code Github repo url to this comment ?

  7. A naming convention suggestion:
    public void MethodName_ExpectedResult_Condition() { }

    public void CanBeCancelledBy_ReturnsTrue_IfUserIsAdmin () { }

  8. Sorry to say. There is a reason people who are good at software quality stop using unit tests.

    For example, if you have a 3 month project, and that project produces 500-1000 bugs, then it makes sense to remove the bugs using high ROI methods. As well as using high ROI methods, we layer the methods to get a compound effect. This is was reduces development time by about 30-50%

    A typical bug search will find 60-80% of bugs. And so if you combine requirements reviews, design reviews, code reviews, coverage tests, you should hit 99-99.9% bug free

    But there is a common problem, it is easy to rush a review and find zero bugs, so it best to measure defect density and ROI to ensure your system is working.

Leave a Reply

© 2023 53GB