Write unit tests for the interface, not the implementation

Write unit tests for the interface, not the implementation

HomeZoran HorvatWrite unit tests for the interface, not the implementation
Write unit tests for the interface, not the implementation
ChannelPublish DateThumbnail & View CountDownload Video
Channel AvatarPublish Date not found Thumbnail
0 Views
Download the source code for this demo on Patreon: https://www.patreon.com/posts/write-unit-tests-85545985
Unit testing is considered by many to be a critical aspect of software development because it ensures that your application works as expected. But how often do you find that your unit tests fail due to unrelated changes in your implementation? If you feel like your unit tests are flawed, you are not alone!
In this video we explore the problem of unit test fragility. We analyze the common pitfall of constructing unit tests that rely too much on specific implementation details, resulting in unstable tests.
The video uses a real-life scenario from a money application to show how a test can fail due to the smallest change in the implementation. The most noticeable change is a change that has nothing to do with the function covered by the test!
But we don't stop at just highlighting the problem; this video offers a solution. The tutorial provides an effective strategy for designing robust tests that are less likely to fail when the implementation changes. Watch this video to gain deep insights into creating unit tests that stand the test of time, largely independent of how your implementation evolves.

Thank you for watching! Please like, comment and share this video because it helps me a lot!! Don't forget to subscribe to my channel for more great videos and click the bell icon so you don't miss any updates.️

Become a supporter ► https://www.patreon.com/ZoranHorvat
Subscribe ► https://www.youtube.com/channel/UCxsWfh8LCcn55mFB6zGBT1g?sub_confirmation=1
Learn more in video courses:
Getting started with object-oriented programming with C# ► https://codinghelmet.com/go/beginning-oop-with-csharp
Collections and generics in C# ► https://codinghelmet.com/go/collections-and-generics-in-cs
How to make your C# code more object-oriented ► https://codinghelmet.com/go/making-your-cs-code-more-oo

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
CONNECT WITH ME

Become a supporter ► https://www.patreon.com/ZoranHorvat
Buy me a coffee ► https://ko-fi.com/zoranhorvat
Pluralsight courses ► https://codinghelmet.com/go/pluralsight
Udemy courses ► https://codinghelmet.com/go/udemy
Follow me on Twitter ► https://twitter.com/zoranh75
Read my articles ► https://codinghelmet.com/articles
Visit me on LinkedIn ► https://www.linkedin.com/in/zoran-horvat/
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
About me
Hi, I'm Zoran and I have over 20 years of experience as a software developer, architect, team leader and more. I have been programming in C# since its introduction in the early 2000s. Since 2017, I have been publishing professional video courses on Pluralsight and Udemy and now there are over 100 hours of the highest quality videos you can watch on these platforms. On my YouTube channel you can find shorter video formats that focus on explaining practical problems in coding, design and architecture of .NET applications.️
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
️LEGAL NOTICES:
United States copyright law recognizes "fair use" of copyrighted content. Section 107 of the U.S. Copyright Law states: "Notwithstanding the provisions of Sections 106 and 106A, the 'fair use' of a copyrighted work, including use by reproduction in copies or recordings, or by any other means specified in that section, for purposes such as criticism, comment, news reporting, teaching (including making multiple copies for classroom use), scholarship, or research, shall not constitute copyright infringement./" This video, and our YouTube channel generally, may contain certain copyrighted works whose use has not been specifically authorized by the copyright owner(s), but which we believe in good faith are protected by federal law and the "fair use" doctrine for one or more of the reasons noted above.

If you have any questions about copyright or other concerns, please contact us at [email protected]

#csharp #dotnet #vscode

Please take the opportunity to connect with your friends and family and share this video with them if you find it useful.