Modular .NET library providing utilities for file handling, text processing, and synchronization context simulation — optimized for testing scenarios.
$ dotnet add package ShadowKitShadowKit is a NuGet meta package that bundles a set of tools designed to support different development scenarios, especially in testing and utility contexts. It consists of several specialized sub-packages, each focusing on a specific area of functionality.
This package provides tools for working with the file system. It is particularly useful in test scenarios that require temporary file or directory structures.
Included tools:
TransientFileManager
A utility for creating temporary files with predefined content. The files are automatically cleaned up after use.
TransientDirectoryManager
A utility for managing temporary directories, useful for scenarios that require short-lived folder structures.
These tools are especially helpful in unit tests where temporary and isolated file system resources are needed.
This package provides tools for working with text.
Included tools:
DetectLineEnding
Detects the type of line endings used in a given text (e.g., \n, \r\n, \r).
StringComparerBuilder
Builds EqualityComparer<string> instances with extended comparison capabilities, especially useful for comparing multi-line strings. Features include:
These tools are particularly helpful in test scenarios where flexible and robust string comparison is required.
This package provides tools for simulating a SynchronizationContext, which can be useful in unit tests that need to test asynchronous code in a controlled threading environment.
To install the full ShadowKit meta package:
dotnet add package ShadowKit
Or install individual packages as needed:
dotnet add package ShadowKit.IO
dotnet add package ShadowKit.Text
dotnet add package ShadowKit.Threading
ShadowKit is released under the MIT License.