NetEvolve.ProjectBuilders.TUnit 0.1.170

Prefix Reserved
dotnet add package NetEvolve.ProjectBuilders.TUnit --version 0.1.170
                    
NuGet\Install-Package NetEvolve.ProjectBuilders.TUnit -Version 0.1.170
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NetEvolve.ProjectBuilders.TUnit" Version="0.1.170" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NetEvolve.ProjectBuilders.TUnit" Version="0.1.170" />
                    
Directory.Packages.props
<PackageReference Include="NetEvolve.ProjectBuilders.TUnit" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NetEvolve.ProjectBuilders.TUnit --version 0.1.170
                    
#r "nuget: NetEvolve.ProjectBuilders.TUnit, 0.1.170"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NetEvolve.ProjectBuilders.TUnit@0.1.170
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NetEvolve.ProjectBuilders.TUnit&version=0.1.170
                    
Install as a Cake Addin
#tool nuget:?package=NetEvolve.ProjectBuilders.TUnit&version=0.1.170
                    
Install as a Cake Tool

NetEvolve.ProjectBuilders.TUnit

NuGet Version NuGet Downloads License

Test utilities for TUnit-based .NET projects, providing helpers for temporary directory management and test environment setup.

Features

  • Temporary directory management for integration tests
  • Utilities for test environment setup and teardown
  • Seamless integration with TUnit test framework

Installation

NuGet Package Manager

Install-Package NetEvolve.ProjectBuilders.TUnit

.NET CLI

dotnet add package NetEvolve.ProjectBuilders.TUnit

PackageReference

<PackageReference Include="NetEvolve.ProjectBuilders.TUnit" />

Quick Start

using NetEvolve.ProjectBuilders.TUnit;
using TUnit;

[ClassDataSource<TemporaryDirectory>]
public class MyTests(TemporaryDirectory directory)
{
    [Test]
    public void TestCreateFile()
    {
        // Create a file in the temporary directory
        using var stream = directory.CreateFile("test.txt");
        // Write to the file (example)
        stream.Write(new byte[] { 1, 2, 3 }, 0, 3);

        string filePath = directory.GetFilePath("test.txt");
        Assert.That(File.Exists(filePath));
    }
}

Usage

Basic Example

[ClassDataSource<TemporaryDirectory>]
public class ExampleTests(TemporaryDirectory directory)
{
    [Test]
    public void TestDirectoryAndFiles()
    {
        // Use directory.FullPath for test files
        var subDir = directory.CreateDirectory("sub");
        using var file = directory.CreateFile("sample.txt");
        file.WriteByte(42);
        string filePath = directory.GetFilePath("sample.txt");
        Assert.That(File.Exists(filePath));
    }
}

Requirements

  • .NET 8.0 or higher
  • TUnit

Documentation

For complete documentation, please visit the official documentation.

Contributing

Contributions are welcome! Please read the Contributing Guidelines before submitting a pull request.

Support

License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❤️ by the NetEvolve Team Visit us at https://www.daily-devops.net for more information about our services and solutions.

Product Compatible and additional computed target framework versions.
.NET 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.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.170 64 3/30/2026