Is THIS The Best Way To Parameterize Tests? - xUnit Theory Data

Опубликовано: 12 Август 2024
на канале: Dev Leader
354
21

xUnit is a popular testing framework that we can use to test our dotnet applications.

But it's got a smell that I've been putting up with for years.

The parameterized test data sucks. We lose all of our type safety when creating generators for object arrays! Yuck!

But what if there was a better way? What if we could ensure type safety with parameterized tests in xUnit?

Let's check out Theory Data!

----
🔑 Membership & Subscriptions:
📨 Weekly Newsletter: https://weekly.devleader.ca
🏘️ Private Discord Community:   / discord  
📽️ YouTube Membership:    / @devleader  

🧠 Courses:
All Courses: https://www.devleader.ca/courses
Getting Started with C#: https://dometrain.com/course/getting-...
Deep dive C#: https://dometrain.com/course/deep-div...
C# Zero to Hero BUNDLE: https://dometrain.com/bundle/from-zer...
Refactoring For C# Devs: https://dometrain.com/course/from-zer...
[FREE] Intro to Software Development:    • [FREE MINI COURSE] - Introduction To ...  

🗣️ Social Media & Links:
All My Links: https://linktr.ee/devleader
Blog: https://www.devleader.ca/
TikTok:   / devleader  
LinkedIn:   / nickcosentino  
Threads: https://threads.net/@dev.leader
Twitter:   / devleaderca  
Facebook:   / devleaderca  
Instagram:   / dev.leader  
GitHub: https://github.com/ncosentino/
Twitch:   / devleaderca  
YouTube:    / @devleader  

❤️ Affiliations & Products/Services That I Love:
VPS hosting from RackNerd: https://my.racknerd.com/aff.php?aff=9013
VPS hosting from Contabo: https://www.jdoqocy.com/click-1010286...
My newsletter platform ConverKit: https://convertkit.com/?lmref=c5X7KQ
My newsletter referral system SparkLoop: https://dash.sparkloop.app/signup?aff...
My AI shorts helper Opus Clip: https://opus.pro/?via=2f9e97
I try to help answer questions at Quora: https://www.quora.com/quoraplus?ch=10...
My favorite computer parts store Newegg: https://click.linksynergy.com/fs-bin/...
My favorite supplement store Bulk Supplements: https://glnk.io/63qn/devleader
----

#dotnet #csharp #xunit #testing


Смотрите видео Is THIS The Best Way To Parameterize Tests? - xUnit Theory Data онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Dev Leader 12 Август 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 354 раз и оно понравилось 21 людям.