I've been designing and developing a very scalable logging library for a while.
The main goal of this library is pretty simple. Like many others projects, a simple goal does not mean a simple way the achieve it. Days after designing the API and the main architecture, this library seems to have a quite large engine on the background.
Most of this engine is based on streams, disk-flushing, text formatting, buffering and, of course, file and directories interaction; nothing surprising, indeed.
After coding a bit, I realized I never thought about the test design. Well, I trusted it to be easier than it seems.
For the sake of explanation, I point out that I am developing in C# (v8.0) with a .NET Standard (v2.1) environment. I prefer the lack of third parties libraries (I will develop separate packages for other libraries or frameworks integration, such as ASPNET, Autofac, and so on...).
The point of the question is, since I am almost bound to the System.IO environment that .NET exposes, I don't know how to really test my librarie's features.
Well, there are lots of methods, classes or modules that are easy to test (I am trying to apply a TDD strategy). But there are many others services left to this, where they interact directly with the file system.
For a testing development environment, I use NUnit with FakeItEasy.
The point is, how can I test and mock those classes, methods and modules that are totally bounded by the machine file system?
Thanks.