Testably.Abstractions.Testing
3.2.0
Prefix Reserved
See the version list below for details.
dotnet add package Testably.Abstractions.Testing --version 3.2.0
NuGet\Install-Package Testably.Abstractions.Testing -Version 3.2.0
<PackageReference Include="Testably.Abstractions.Testing" Version="3.2.0" />
paket add Testably.Abstractions.Testing --version 3.2.0
#r "nuget: Testably.Abstractions.Testing, 3.2.0"
// Install Testably.Abstractions.Testing as a Cake Addin #addin nuget:?package=Testably.Abstractions.Testing&version=3.2.0 // Install Testably.Abstractions.Testing as a Cake Tool #tool nuget:?package=Testably.Abstractions.Testing&version=3.2.0
This library contains the testing helpers for Testably.Abstractions.
MockFileSystem
Initialization
Shows how to initialize the file system:
fileSystem.InitializeIn("current-directory")
.WithASubdirectory()
.WithSubdirectory("foo").Initialized(s => s
.WithAFile())
.WithFile("bar.txt");
Initialize the file system in "current-directory" with
- a randomly named directory
- a directory named "foo" which contains a randomly named file
- a file named "bar.txt"
In order to use multiple drives on Windows (or network shares) you have to first register them:
fileSystem.WithDrive(@"D:", drive => drive.SetTotalSize(1024));
The optional configuration allows limiting the maximum available space on the drive.
Events
All changes in the file system trigger certain events. All events can be
- intercepted, before they occur (and e.g. an exception thrown to prevent the event from completing) on the
Intercept
property:MockFileSystem fileSystem = new(); fileSystem.Intercept.Creating(FileSystemTypes.File, _ => throw new Exception("my custom exception"));
- notified, after they occured to allow a test to react to changes on the
MockFileSystem.Notify
property: These methods return an awaitable object that- Removes the notification on dispose
- Provides a blocking mechanism until the notification happens
MockFileSystem fileSystem = new(); fileSystem.Notify .OnCreated(FileSystemTypes.File, _ => { // Do something }) .ExecuteWhileWaiting(() => { // This will trigger the callback fileSystem.File.Create("some-file.txt"); }) .Wait();
Product | Versions 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 is compatible. 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. |
.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. |
-
.NETStandard 2.0
- System.Linq.Async (>= 6.0.1)
- System.Threading.Channels (>= 8.0.0)
- Testably.Abstractions.Interface (>= 3.2.0)
-
.NETStandard 2.1
- System.Linq.Async (>= 6.0.1)
- System.Threading.Channels (>= 8.0.0)
- Testably.Abstractions.Interface (>= 3.2.0)
-
net6.0
- System.Linq.Async (>= 6.0.1)
- System.Threading.Channels (>= 8.0.0)
- Testably.Abstractions.Interface (>= 3.2.0)
-
net7.0
- System.Linq.Async (>= 6.0.1)
- System.Threading.Channels (>= 8.0.0)
- Testably.Abstractions.Interface (>= 3.2.0)
-
net8.0
- System.Linq.Async (>= 6.0.1)
- System.Threading.Channels (>= 8.0.0)
- Testably.Abstractions.Interface (>= 3.2.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Testably.Abstractions.Testing:
Package | Downloads |
---|---|
Testably.Abstractions.FluentAssertions
FluentAssertions extension methods for `Testably.Abstractions`. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.2.3 | 1,364 | 8/16/2024 |
3.2.2 | 512 | 7/17/2024 |
3.2.1 | 1,288 | 5/16/2024 |
3.2.0 | 355 | 5/5/2024 |
3.1.2 | 566 | 4/9/2024 |
3.1.1 | 245 | 4/7/2024 |
3.1.0 | 979 | 4/1/2024 |
3.0.1 | 201 | 3/30/2024 |
3.0.0 | 225 | 3/29/2024 |
2.6.1 | 11,051 | 1/7/2024 |
2.6.0 | 1,298 | 11/16/2023 |
2.5.1 | 158 | 11/16/2023 |
2.5.0 | 2,446 | 10/7/2023 |
2.4.1 | 5,280 | 8/23/2023 |
2.4.0 | 152 | 8/23/2023 |
2.3.4 | 3,838 | 8/1/2023 |
2.3.3 | 723 | 7/24/2023 |
2.3.2 | 997 | 7/17/2023 |
2.3.1 | 1,082 | 5/15/2023 |
2.3.0 | 166 | 5/12/2023 |
2.2.2 | 8,588 | 4/18/2023 |
2.2.1 | 175 | 4/16/2023 |
2.2.0 | 212 | 4/10/2023 |
2.1.0 | 525 | 3/7/2023 |
2.0.1 | 569 | 2/6/2023 |
2.0.0 | 375 | 12/18/2022 |
1.0.0 | 364 | 11/18/2022 |