diff --git a/Docs/pages/docs/companion-libraries/access-control.mdx b/Docs/pages/docs/companion-libraries/access-control.mdx index 3614bf927..1ae2a2a69 100644 --- a/Docs/pages/docs/companion-libraries/access-control.mdx +++ b/Docs/pages/docs/companion-libraries/access-control.mdx @@ -4,15 +4,13 @@ title: Access control description: GetAccessControl and SetAccessControl on IFileSystem, so ACL code runs against the real and the mocked file system. --- -# Testably.Abstractions.AccessControl +import PackageInstall from '@site/src/components/PackageInstall'; -[![NuGet](https://img.shields.io/nuget/v/Testably.Abstractions.AccessControl?label=NuGet&logo=nuget)](https://www.nuget.org/packages/Testably.Abstractions.AccessControl) +# Testably.Abstractions.AccessControl Implements the methods from [`FileSystemAclExtensions`](https://learn.microsoft.com/en-us/dotnet/api/system.io.filesystemaclextensions) on the `IFileSystem` interface so production code that reads or writes ACLs works against both real and mocked file systems. -```powershell -dotnet add package Testably.Abstractions.AccessControl -``` + ## What it adds diff --git a/Docs/pages/docs/companion-libraries/compression.mdx b/Docs/pages/docs/companion-libraries/compression.mdx index 97c6d7589..13741295f 100644 --- a/Docs/pages/docs/companion-libraries/compression.mdx +++ b/Docs/pages/docs/companion-libraries/compression.mdx @@ -4,15 +4,13 @@ title: Compression description: ZipFile and ZipArchive on IFileSystem, so zip code runs against the real and the mocked file system. --- -# Testably.Abstractions.Compression +import PackageInstall from '@site/src/components/PackageInstall'; -[![NuGet](https://img.shields.io/nuget/v/Testably.Abstractions.Compression?label=NuGet&logo=nuget)](https://www.nuget.org/packages/Testably.Abstractions.Compression) +# Testably.Abstractions.Compression Wraps `System.IO.Compression.ZipFile` and `System.IO.Compression.ZipArchive` as extensions on `IFileSystem`. -```powershell -dotnet add package Testably.Abstractions.Compression -``` + ## Why this package exists diff --git a/Docs/pages/docs/companion-libraries/memory-mapped-files.mdx b/Docs/pages/docs/companion-libraries/memory-mapped-files.mdx index b66a1f197..4b81af814 100644 --- a/Docs/pages/docs/companion-libraries/memory-mapped-files.mdx +++ b/Docs/pages/docs/companion-libraries/memory-mapped-files.mdx @@ -4,15 +4,13 @@ title: Memory-mapped files description: MemoryMappedFile on IFileSystem, so memory-mapped file code can be tested against the MockFileSystem. --- -# Testably.Abstractions.MemoryMappedFiles +import PackageInstall from '@site/src/components/PackageInstall'; -[![NuGet](https://img.shields.io/nuget/v/Testably.Abstractions.MemoryMappedFiles?label=NuGet&logo=nuget)](https://www.nuget.org/packages/Testably.Abstractions.MemoryMappedFiles) +# Testably.Abstractions.MemoryMappedFiles Wraps `System.IO.MemoryMappedFiles.MemoryMappedFile` as a `MemoryMappedFile` extension property on `IFileSystem`, so memory-mapped-file code can be tested against the in-memory `MockFileSystem`. -```powershell -dotnet add package Testably.Abstractions.MemoryMappedFiles -``` + ## Why this package exists diff --git a/Docs/pages/docs/getting-started.mdx b/Docs/pages/docs/getting-started.mdx index 4ff87b203..e998e5991 100644 --- a/Docs/pages/docs/getting-started.mdx +++ b/Docs/pages/docs/getting-started.mdx @@ -4,16 +4,19 @@ title: Getting Started description: Install the packages, register the real implementations and replace them with mocks in tests. --- +import PackageInstall from '@site/src/components/PackageInstall'; + # Getting Started ## 1. Install the packages -Install `Testably.Abstractions` in your production projects and `Testably.Abstractions.Testing` in your test projects: +Install `Testably.Abstractions` in your production projects: -```powershell -dotnet add package Testably.Abstractions -dotnet add package Testably.Abstractions.Testing -``` + + +and `Testably.Abstractions.Testing` in your test projects: + + | Package | Install it in | |---------------------------------------------|---------------------------------------------------------------------------------------------------| @@ -24,13 +27,9 @@ dotnet add package Testably.Abstractions.Testing Both `Testably.Abstractions` and `Testably.Abstractions.Testing` pull in the interface packages transitively. -Optional [companion packages](./companion-libraries): - -```powershell -dotnet add package Testably.Abstractions.Compression -dotnet add package Testably.Abstractions.AccessControl -dotnet add package Testably.Abstractions.MemoryMappedFiles -``` +Optional [companion packages](./companion-libraries) add [compression](./companion-libraries/compression), +[access control](./companion-libraries/access-control) and +[memory-mapped files](./companion-libraries/memory-mapped-files); each page shows how to install it. ## 2. Register the abstractions diff --git a/Docs/pages/docs/index.mdx b/Docs/pages/docs/index.mdx index 4a46f4fdc..65b508af6 100644 --- a/Docs/pages/docs/index.mdx +++ b/Docs/pages/docs/index.mdx @@ -8,9 +8,6 @@ description: Injectable abstractions for the file system, time and randomness in import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -[![Testably.Abstractions](https://img.shields.io/nuget/v/Testably.Abstractions?label=Testably.Abstractions&logo=nuget)](https://www.nuget.org/packages/Testably.Abstractions) -[![Testably.Abstractions.Testing](https://img.shields.io/nuget/v/Testably.Abstractions.Testing?label=Testably.Abstractions.Testing&logo=nuget)](https://www.nuget.org/packages/Testably.Abstractions.Testing) - `Testably.Abstractions` provides 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. ## Inject. Mock. Test.