REFACTORING UNIT TESTS in ASP NET Core | Getting Started With ASP.NET Core Series

Rahul Nath
Rahul Nath
9.6 هزار بار بازدید - 3 سال پیش - Hello Friends, Writing maintainable and
Hello Friends, Writing maintainable and robust unit tests is hard. Often when making changes to our main code a lot of tests break, making it hard to refactor and update code. We also avoid writing tests for the same reasons. Setting up test data can also be painful and makes tests less maintainable. In this video, I will walk you through a refactoring exercise of making tests more maintainable and robust. I use existing tests from Microsoft documentation examples and walk through the existing issues and how to make them better. 00:00 Introduction 02:45 - Common Problems 06:00 - AutoFixture Introduction & Setup 07:38 - Automatic Data Setup 13:18 - Domain-Specific Data Setup 25:15 - Enumerable Test Data 27:57 - Mocking Dependencies Additional Watching 📹 AutoFixture Series -    • AutoFixture   📹ASP NET Core Series -    • ASP.NET Core   📹Logging -    • LOGGING in ASP.NET Core | Getting Sta...   LInks 🔗 AutoFixture - autofixture.github.io/ 🔗Refactored Source Code - rahulpnath.visualstudio.com/DefaultCollection/YouT… 🔗Unit Tests - docs.microsoft.com/en-us/aspnet/core/mvc/controlle… 🔗 Don't Let Entity Framework Fool Your Constructors - www.rahulpnath.com/blog/dont-let-ef-fool-your-cons… Come say hi! ✋ 🌍 Blog - rahulpnath.com/ ✉ Subscribe to my Newsletter - www.rahulpnath.com/subscribe 🐦Twitter - twitter.com/rahulpnath 📸Instagram - www.instagram.com/rahulpnath/ 🎥 Recording Setup and Workflow - www.rahulpnath.com/blog/youtube_setup_and_workflow… Make sure to SUBSCRIBE to the channel. THANK YOU for helping me grow this
3 سال پیش در تاریخ 1400/05/07 منتشر شده است.
9,653 بـار بازدید شده
... بیشتر