Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions Docs/pages/docs/companion-libraries/access-control.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
<PackageInstall package="Testably.Abstractions.AccessControl" />

## What it adds

Expand Down
8 changes: 3 additions & 5 deletions Docs/pages/docs/companion-libraries/compression.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
<PackageInstall package="Testably.Abstractions.Compression" />

## Why this package exists

Expand Down
8 changes: 3 additions & 5 deletions Docs/pages/docs/companion-libraries/memory-mapped-files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
<PackageInstall package="Testably.Abstractions.MemoryMappedFiles" />

## Why this package exists

Expand Down
23 changes: 11 additions & 12 deletions Docs/pages/docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
<PackageInstall package="Testably.Abstractions" />

and `Testably.Abstractions.Testing` in your test projects:

<PackageInstall package="Testably.Abstractions.Testing" />

| Package | Install it in |
|---------------------------------------------|---------------------------------------------------------------------------------------------------|
Expand All @@ -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

Expand Down
3 changes: 0 additions & 3 deletions Docs/pages/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading