Packt
Complete Guide to Unit Testing in .NET Core (NUnit & xUnit)
Packt

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

Packt

Instructor: Packt

Included with Coursera Plus

Gain insight into a topic and learn the fundamentals.
Beginner level

Recommended experience

7 hours to complete
3 weeks at 2 hours a week
Flexible schedule
Learn at your own pace
Gain insight into a topic and learn the fundamentals.
Beginner level

Recommended experience

7 hours to complete
3 weeks at 2 hours a week
Flexible schedule
Learn at your own pace

What you'll learn

  • Execute unit tests and debug them effectively in .NET Core environments, using MSTest, NUnit, and xUnit.

  • Differentiate between various testing scenarios, evaluating the appropriate use of mocking and dependency injection with the Moq framework.

  • Understand the principles and benefits of automated unit testing, and describe how NUnit and xUnit frameworks facilitate these processes.

  • Create unit tests for an N-tier real-world web application project using xUnit.

Details to know

Shareable certificate

Add to your LinkedIn profile

Recently updated!

September 2024

Assessments

4 assignments

Taught in English

See how employees at top companies are mastering in-demand skills

Placeholder
Placeholder

Earn a career certificate

Add this credential to your LinkedIn profile, resume, or CV

Share it on social media and in your performance review

Placeholder

There are 7 modules in this course

In this module, we will introduce you to the course, covering the basics of manual and automated testing. You will learn about the tools needed and gain an understanding of different types of tests, including the testing pyramid and the logical phase of an automated test.

What's included

7 videos1 reading

In this module, we will guide you through the initial steps of setting up your first unit test. You'll learn about the nullable feature in .NET 6, create a project, and explore writing and troubleshooting unit tests using MSTest.

What's included

5 videos

In this module, we will delve into unit testing with NUnit. You will create NUnit projects, write tests, and use debugging and assertion techniques. Additionally, you'll complete assignments to solidify your understanding and handle various assertion scenarios.

What's included

13 videos1 assignment

In this module, we will explore advanced concepts in NUnit testing. You will learn to assert collections, handle exceptions, and set up inheritance. The module includes assignments on grading calculators and the Fibonacci series to apply these advanced techniques.

What's included

14 videos

In this module, we will focus on using MOQ for unit testing. You will learn to set up and configure mock objects, perform integration tests, and handle various scenarios with loggers and return values. The module also covers advanced MOQ features like properties and callbacks.

What's included

17 videos1 assignment

In this module, we will cover unit testing with xUnit. You will create xUnit projects, compare it with other frameworks, and work on assignments related to grading calculators and the Fibonacci series. The module also includes topics on MOQ integration with xUnit.

What's included

11 videos

In this module, we will apply NUnit testing to real-world examples. You will set up main projects, data access unit test projects, and Bongo core projects. The module covers in-memory databases, core unit tests, and web application testing, ensuring you can handle complex testing scenarios effectively.

What's included

19 videos2 assignments

Instructor

Packt
Packt
231 Courses3,858 learners

Offered by

Packt

Recommended if you're interested in Software Development

Why people choose Coursera for their career

Felipe M.
Learner since 2018
"To be able to take courses at my own pace and rhythm has been an amazing experience. I can learn whenever it fits my schedule and mood."
Jennifer J.
Learner since 2020
"I directly applied the concepts and skills I learned from my courses to an exciting new project at work."
Larry W.
Learner since 2021
"When I need courses on topics that my university doesn't offer, Coursera is one of the best places to go."
Chaitanya A.
"Learning isn't just about being better at your job: it's so much more than that. Coursera allows me to learn without limits."

New to Software Development? Start here.

Placeholder

Open new doors with Coursera Plus

Unlimited access to 7,000+ world-class courses, hands-on projects, and job-ready certificate programs - all included in your subscription

Advance your career with an online degree

Earn a degree from world-class universities - 100% online

Join over 3,400 global companies that choose Coursera for Business

Upskill your employees to excel in the digital economy

Frequently asked questions