Skip to content

AhmedTarekHasan/HowToAbstractIO

Repository files navigation

How To Fully Cover I/O File Based Applications in .NET C# With Unit Tests

Learn how to divide the application into smaller modules which you can cover by 100%


While working for different software houses, in more than one occasion I had the chance to work on an application which is mainly based on I/O File operations.

The biggest challenge the team was facing while working on such kind of applications is that the I/O File operations are so hard to be covered by unit tests, automate Bamboo builds, and many other things.

Therefore, once and for all, I decided to come up with the best design I can come up with to overcome these challenges. However, just as a reminder, nothing in software is an absolute truth. For every application you have to reconsider your design, see where it fits, where it doesn’t fit, and finally you need to adapt.

Now, as usual, I am going to provide a simple example and walk you through the trip to come up with the best -possible- solution.


If you are interested into reading more about this topic, you can read the rest of the article.


If you want to support me:

▶ Subscribe to Medium using my referral link
▶ Subscribe to Medium Newsletter
▶ Subscribe to LinkedIn Newsletter
▶ Follow me on Medium
▶ Follow me on Twitter
▶ Follow me on LinkedIn


Authors: