2dog.xunit 4.7.1.44

There is a newer version of this package available.
See the version list below for details.
dotnet add package 2dog.xunit --version 4.7.1.44
                    
NuGet\Install-Package 2dog.xunit -Version 4.7.1.44
                    
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="2dog.xunit" Version="4.7.1.44" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="2dog.xunit" Version="4.7.1.44" />
                    
Directory.Packages.props
<PackageReference Include="2dog.xunit" />
                    
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 2dog.xunit --version 4.7.1.44
                    
#r "nuget: 2dog.xunit, 4.7.1.44"
                    
#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 2dog.xunit@4.7.1.44
                    
#: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=2dog.xunit&version=4.7.1.44
                    
Install as a Cake Addin
#tool nuget:?package=2dog.xunit&version=4.7.1.44
                    
Install as a Cake Tool

2dog.xunit

xUnit collection definitions for testing Godot applications with 2dog.

The fixtures themselves (GodotFixture, GodotHeadlessFixture, GodotFixtureBase) ship in the 2dog package, in the twodog.fixture namespace. This package adds the xUnit-specific glue on top of them.

What it provides

  • GodotCollection – binds the full (rendering) GodotFixture
  • GodotHeadlessCollection – binds GodotHeadlessFixture (use this for CI)

Both set DisableParallelization = true, which is required because Godot allows only one instance per process.

How it works

xUnit only discovers [CollectionDefinition] classes that live in the test assembly – a definition shipped in a referenced DLL is silently ignored (its DisableParallelization and ICollectionFixture<T> are not applied). To make the collections actually work, this package ships them as compile-in source: a build/2dog.xunit.targets file adds the collection definitions to your test project's compilation, so they end up in your test assembly where xUnit can find them.

You therefore do not write your own collection definition – just reference the package and use the collections directly.

Usage

using Godot;
using twodog.fixture; // GodotHeadlessFixture
using twodog.xunit;   // GodotHeadlessCollection
using Xunit;

[Collection<GodotHeadlessCollection>]
public class MyTests(GodotHeadlessFixture godot)
{
    [Fact]
    public void EngineStarts()
    {
        Assert.NotNull(godot.Tree);
    }
}

Custom fixtures

Need a different Godot configuration? Subclass GodotFixtureBase (from the 2dog package) and write a one-line collection for it in your own test project:

using twodog.fixture;
using Xunit;

public class GodotOpenGl3Fixture() : GodotFixtureBase("--display-driver", "opengl3");

[CollectionDefinition(nameof(GodotOpenGl3Collection), DisableParallelization = true)]
public class GodotOpenGl3Collection : ICollectionFixture<GodotOpenGl3Fixture>;
There are no supported framework assets in this 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
4.7.1.51 41 7/22/2026
4.7.1.50 42 7/22/2026
4.7.1.49 113 7/19/2026
4.7.1.48 88 7/19/2026
4.7.1.46 119 7/17/2026
4.7.1.45 100 7/15/2026
4.7.1.44 93 7/15/2026
4.7.1.43 91 7/15/2026
4.7.0.41 97 7/14/2026
4.7.0.40 89 7/14/2026
4.7.0.39 93 7/14/2026
4.7.0.38 107 7/13/2026
4.7.0.37 100 7/13/2026
4.7.0.36 105 7/13/2026
4.7.0.35 106 7/13/2026
4.7.0.34 101 7/13/2026
4.7.0.32 107 7/12/2026
4.7.0.31 102 7/12/2026
4.7.0.30 103 7/12/2026
4.7.0.29 114 7/12/2026
Loading failed