How to use Moq to mock xUnit tests for a .NET project

preview_player
Показать описание
We used Moq in an xUnit test project!

As a result, we can mock objects in unit tests for a .NET and C# project.

We'll show you can how you can do it.

You'll learn how you can initialise a mock object, how to verify how many times an instance is called, and how to deal with exceptions.

As bonus, we'll also show you how you can add parameters to a mock object.

💻 Download the code example💻

► Read the tutorial:

🎓 .NET tutorials, code examples and coding challenges 🎓

► Chapters
0:00 Coming up...
0:15 Create objects for mocking
2:06 Mock objects for testing
9:03 Learn more about xUnit
Рекомендации по теме
Комментарии
Автор

The thumbnail alone was enough for me to leave a like :D

Keep up the good work!

simshady
Автор

Have you had problems with Moq library dependencies? Castle.Core specifically?

trehbeh
join shbcf.ru