NetEvolve.ProjectBuilders.XUnit
0.1.170
Prefix Reserved
dotnet add package NetEvolve.ProjectBuilders.XUnit --version 0.1.170
NuGet\Install-Package NetEvolve.ProjectBuilders.XUnit -Version 0.1.170
<PackageReference Include="NetEvolve.ProjectBuilders.XUnit" Version="0.1.170" />
<PackageVersion Include="NetEvolve.ProjectBuilders.XUnit" Version="0.1.170" />
<PackageReference Include="NetEvolve.ProjectBuilders.XUnit" />
paket add NetEvolve.ProjectBuilders.XUnit --version 0.1.170
#r "nuget: NetEvolve.ProjectBuilders.XUnit, 0.1.170"
#:package NetEvolve.ProjectBuilders.XUnit@0.1.170
#addin nuget:?package=NetEvolve.ProjectBuilders.XUnit&version=0.1.170
#tool nuget:?package=NetEvolve.ProjectBuilders.XUnit&version=0.1.170
NetEvolve.ProjectBuilders.XUnit
Test utilities for xUnit-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 xUnit test framework
Installation
NuGet Package Manager
Install-Package NetEvolve.ProjectBuilders.XUnit
.NET CLI
dotnet add package NetEvolve.ProjectBuilders.XUnit
PackageReference
<PackageReference Include="NetEvolve.ProjectBuilders.XUnit" />
Quick Start
using NetEvolve.ProjectBuilders.XUnit;
using Xunit;
public class MyTests : IClassFixture<TemporaryDirectoryFixture>
{
private readonly TemporaryDirectoryFixture _fixture;
public MyTests(TemporaryDirectoryFixture fixture)
{
_fixture = fixture;
}
[Fact]
public void TestCreateFile()
{
// Create a file in the temporary directory
using var stream = _fixture.CreateFile("test.txt");
stream.WriteByte(42);
string filePath = _fixture.GetFilePath("test.txt");
Assert.True(File.Exists(filePath));
}
[Fact]
public void TestCreateDirectory()
{
var subDir = _fixture.CreateDirectory("sub");
Assert.True(Directory.Exists(Path.Combine(_fixture.FullPath, "sub")));
}
}
Usage
Basic Example
public class ExampleTests : IClassFixture<TemporaryDirectoryFixture>
{
private readonly TemporaryDirectoryFixture _fixture;
public ExampleTests(TemporaryDirectoryFixture fixture)
{
_fixture = fixture;
}
[Fact]
public void TestDirectoryAndFiles()
{
// Use _fixture.FullPath for test files
var subDir = _fixture.CreateDirectory("sub");
using var file = _fixture.CreateFile("sample.txt");
file.WriteByte(99);
string filePath = _fixture.GetFilePath("sample.txt");
Assert.True(File.Exists(filePath));
}
}
Requirements
- .NET 8.0 or higher
- xUnit
Related Packages
- NetEvolve.ProjectBuilders - Core project builder utilities
- NetEvolve.ProjectBuilders.TUnit - Test utilities for 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
- Issues: Report bugs or request features on GitHub Issues
- Documentation: Read the full documentation at https://github.com/dailydevops/projectbuilders
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 | Versions 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. |
-
net10.0
- CliWrap (>= 3.10.1)
- NetEvolve.Arguments (>= 3.2.84)
- NetEvolve.ProjectBuilders (>= 0.1.170)
- xunit.v3.extensibility.core (>= 3.2.2)
-
net8.0
- CliWrap (>= 3.10.1)
- NetEvolve.Arguments (>= 3.2.84)
- NetEvolve.ProjectBuilders (>= 0.1.170)
- xunit.v3.extensibility.core (>= 3.2.2)
-
net9.0
- CliWrap (>= 3.10.1)
- NetEvolve.Arguments (>= 3.2.84)
- NetEvolve.ProjectBuilders (>= 0.1.170)
- xunit.v3.extensibility.core (>= 3.2.2)
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 | 72 | 3/30/2026 |