FluentAssertions.FileSystem
1.0.2
dotnet add package FluentAssertions.FileSystem --version 1.0.2
NuGet\Install-Package FluentAssertions.FileSystem -Version 1.0.2
<PackageReference Include="FluentAssertions.FileSystem" Version="1.0.2" />
<PackageVersion Include="FluentAssertions.FileSystem" Version="1.0.2" />
<PackageReference Include="FluentAssertions.FileSystem" />
paket add FluentAssertions.FileSystem --version 1.0.2
#r "nuget: FluentAssertions.FileSystem, 1.0.2"
#:package FluentAssertions.FileSystem@1.0.2
#addin nuget:?package=FluentAssertions.FileSystem&version=1.0.2
#tool nuget:?package=FluentAssertions.FileSystem&version=1.0.2
FluentAssertions.FileSystem
This is a small extension for the popular FluentAssertions library that provides some simple assertions for use with the MockFileSystem type provided by System.IO.Abstractions project.
This package provides a new namespace FluentAssertions.FileSystem that provides an extension method .Should() on the MockFilesystem type provided by System.IO.Abstractions.
The Should method returns an assertions object that has several helpful assertions which can analyze and assert about the MockFilesystem in question.
Example
using System.IO.Abstractions.TestingHelpers;
using FluentAssertions.Filesystem;
public class ExampleUsage
{
public void Example()
{
var mockFileSystem = new MockFileSystem();
mockFileSystem
.AddDirectory("example_directory");
mockFileSystem
.Should()
.ContainDirectory("example_directory");
}
}
See the provided unit tests for more examples, and the comments in MockFileSystemAssertions for full details about what assertions are available and how to use them.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 was computed. 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. |
-
net9.0
- FluentAssertions (>= 7.0.0)
- System.IO.Abstractions (>= 21.1.7)
- System.IO.Abstractions.TestingHelpers (>= 19.2.29)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.