Testably.Abstractions.Testing
3.2.3
Prefix Reserved
dotnet add package Testably.Abstractions.Testing --version 3.2.3
NuGet\Install-Package Testably.Abstractions.Testing -Version 3.2.3
<PackageReference Include="Testably.Abstractions.Testing" Version="3.2.3" />
paket add Testably.Abstractions.Testing --version 3.2.3
#r "nuget: Testably.Abstractions.Testing, 3.2.3"
// Install Testably.Abstractions.Testing as a Cake Addin #addin nuget:?package=Testably.Abstractions.Testing&version=3.2.3 // Install Testably.Abstractions.Testing as a Cake Tool #tool nuget:?package=Testably.Abstractions.Testing&version=3.2.3
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.3)
-
.NETStandard 2.1
- System.Linq.Async (>= 6.0.1)
- System.Threading.Channels (>= 8.0.0)
- Testably.Abstractions.Interface (>= 3.2.3)
-
net6.0
- System.Linq.Async (>= 6.0.1)
- System.Threading.Channels (>= 8.0.0)
- Testably.Abstractions.Interface (>= 3.2.3)
-
net7.0
- System.Linq.Async (>= 6.0.1)
- System.Threading.Channels (>= 8.0.0)
- Testably.Abstractions.Interface (>= 3.2.3)
-
net8.0
- System.Linq.Async (>= 6.0.1)
- System.Threading.Channels (>= 8.0.0)
- Testably.Abstractions.Interface (>= 3.2.3)
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 | 867 | 8/16/2024 |
3.2.2 | 427 | 7/17/2024 |
3.2.1 | 1,230 | 5/16/2024 |
3.2.0 | 352 | 5/5/2024 |
3.1.2 | 559 | 4/9/2024 |
3.1.1 | 244 | 4/7/2024 |
3.1.0 | 908 | 4/1/2024 |
3.0.1 | 200 | 3/30/2024 |
3.0.0 | 222 | 3/29/2024 |
2.6.1 | 10,348 | 1/7/2024 |
2.6.0 | 1,294 | 11/16/2023 |
2.5.1 | 157 | 11/16/2023 |
2.5.0 | 2,319 | 10/7/2023 |
2.4.1 | 5,118 | 8/23/2023 |
2.4.0 | 151 | 8/23/2023 |
2.3.4 | 3,786 | 8/1/2023 |
2.3.3 | 720 | 7/24/2023 |
2.3.2 | 996 | 7/17/2023 |
2.3.1 | 1,078 | 5/15/2023 |
2.3.0 | 165 | 5/12/2023 |
2.2.2 | 8,033 | 4/18/2023 |
2.2.1 | 174 | 4/16/2023 |
2.2.0 | 209 | 4/10/2023 |
2.1.0 | 524 | 3/7/2023 |
2.0.1 | 564 | 2/6/2023 |
2.0.0 | 374 | 12/18/2022 |
1.0.0 | 363 | 11/18/2022 |