Testably.Abstractions.FileSystem.Interface (10.1.0)
Published 2026-11-23 16:32:33 +00:00 by demo-admin
Installation
dotnet nuget add source --name demo-admin --username your_username --password your_token dotnet add package --source demo-admin --version 10.1.0 Testably.Abstractions.FileSystem.InterfaceAbout this package
A set of abstractions to help make file system interactions testable.
This library contains the abstraction interfaces for Testably.Abstractions, which allow replacing system dependencies:
- The
IFileSysteminterface abstracts away all I/O-related functionality from theSystem.IOnamespace:
Static methods are directly implemented on theIFileSysteminterface. Constructors are implemented as factory methods, e.g.IFileSystem.FileInfo.New(string)instead ofnew FileInfo(string). - The
ITimeSysteminterface abstracts away time-related functionality:
DateTimemethods give access to the current time,Threadallows replacingThread.SleepandTaskallows replacingTask.Delay. - The
IRandomSysteminterface abstracts away functionality related to randomness:
Randommethods implement a thread-safe Shared instance also under .NET Framework andGuidmethods allow creating new GUIDs.
