Testably.Abstractions 10.3.0

Prefix Reserved
dotnet add package Testably.Abstractions --version 10.3.0
                    
NuGet\Install-Package Testably.Abstractions -Version 10.3.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Testably.Abstractions" Version="10.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Testably.Abstractions" Version="10.3.0" />
                    
Directory.Packages.props
<PackageReference Include="Testably.Abstractions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Testably.Abstractions --version 10.3.0
                    
#r "nuget: Testably.Abstractions, 10.3.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Testably.Abstractions@10.3.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Testably.Abstractions&version=10.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Testably.Abstractions&version=10.3.0
                    
Install as a Cake Tool

Testably.Abstractions

Changelog

Testably.Abstractions Testably.Abstractions.Testing Coverage

Injectable abstractions for the static parts of the .NET base class library (BCL) - file system, time and randomness - with feature-complete in-memory mocks for tests.

📖 Full documentation: docs.testably.org/Abstractions

Quick example

public class ReportService(IFileSystem fileSystem)
{
    public void Save(string content)
    {
        fileSystem.Directory.CreateDirectory("reports");
        fileSystem.File.WriteAllText("reports/latest.xml", content);
    }
}
[Fact]
public async Task Save_WritesReportToReportsFolder()
{
    var fileSystem = new MockFileSystem();
    var sut = new ReportService(fileSystem);

    sut.Save("<report />");

    await Expect.That(fileSystem.File.ReadAllText("reports/latest.xml"))
        .IsEqualTo("<report />");
}

Install

dotnet add package Testably.Abstractions
dotnet add package Testably.Abstractions.Testing

Then register the implementations in your DI container - see Getting Started.

Packages

Package Purpose
Testably.Abstractions Production interfaces (IFileSystem, ITimeSystem, IRandomSystem)
Testably.Abstractions.Testing MockFileSystem, MockTimeSystem, MockRandomSystem
Testably.Abstractions.Compression Zip / ZipArchive extension methods on IFileSystem
Testably.Abstractions.AccessControl GetAccessControl / SetAccessControl on files and directories

Already on TestableIO?

Testably.Abstractions shares the IFileSystem interface with TestableIO.System.IO.Abstractions, so production code stays untouched. See the migration guide.

Contributing

Issues and pull requests are welcome - see CONTRIBUTING.md and the issue tracker.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (21)

Showing the top 5 NuGet packages that depend on Testably.Abstractions:

Package Downloads
SAF.Hosting

SAF host information and diagnostics services.

MyLittleContentEngine

A powerful content engine for building static sites with Blazor and ASP.NET Core

AnakinRaW.CommonUtilities

Provides common classes and utilities for personal use.

AnakinRaW.CommonUtilities.FileSystem

Helper classes and methods targeting the file system.

ktsu.Abstractions

A library providing a comprehensive set of interfaces for compression, encryption, hashing, obfuscation, serialization, and filesystem access with zero-allocation Try* methods and convenient default implementations.

GitHub repositories (4)

Showing the top 4 popular GitHub repositories that depend on Testably.Abstractions:

Repository Stars
ErsatzTV/legacy
Open-source platform that transforms your personal media library into live, custom TV channels.
NethermindEth/nethermind
A robust, high-performance execution client for Ethereum node operators.
Monitor221hz/Pandora-Behaviour-Engine-Plus
Patcher for behavior, character, and skeleton project files for Skyrim Special Edition.
TeamWheelWizard/WheelWizard
WheelWizard, Retro Rewind Launcher
Version Downloads Last Updated
10.3.0 1,071 7/12/2026
10.3.0-pre.1 349 7/10/2026
10.2.0 3,203,820 3/24/2026
10.2.0-pre.1 381 3/13/2026
10.1.0 976,466 2/21/2026
10.1.0-rc1 181 2/20/2026
10.0.0 83,013 11/12/2025
10.0.0-pre.1 177 8/15/2025
9.0.0 123,012 1/31/2025
9.0.0-pre.2 134 1/31/2025
9.0.0-pre.1 149 1/30/2025
3.2.4 26,386 11/12/2024
3.2.3 19,824 8/16/2024
3.2.2 1,147 7/17/2024
3.2.1 3,043 5/16/2024
3.2.0 570 5/5/2024
3.1.2 756 4/9/2024
3.1.1 271 4/7/2024
3.1.0 354 4/1/2024
3.0.1 291 3/30/2024
Loading failed