gdUnit4.api
4.2.1.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package gdUnit4.api --version 4.2.1.1
NuGet\Install-Package gdUnit4.api -Version 4.2.1.1
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="gdUnit4.api" Version="4.2.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="gdUnit4.api" Version="4.2.1.1" />
<PackageReference Include="gdUnit4.api" />
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 gdUnit4.api --version 4.2.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: gdUnit4.api, 4.2.1.1"
#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 gdUnit4.api@4.2.1.1
#: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=gdUnit4.api&version=4.2.1.1
#tool nuget:?package=gdUnit4.api&version=4.2.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
The C# GdUnit4 API
What is GdUnit4.Api
gdUnit4.api is the C# package to enable GdUnit4 to run/write unit tests in C#.
Features
- Support for writing and executing tests in C#
- Convenient interface for running test-suites directly from Godot<br> One of the main features of GdUnit4 is the ability to run test-suites directly from the Godot editor using the context menu. You can run test-suites from the FileSystem panel, the ScriptEditor, or the GdUnit Inspector. To do this, simply right-click on the desired test-suite or test-case and select "Run Test(s)" from the context menu. This will run the selected tests and display the results in the GdUnit Inspector.<br> You can create new test cases directly from the ScriptEditor by right-clicking on the function you want to test and selecting "Create TestCase" from the context menu.
- Fluent syntax for writing test cases that's easy to read and understand
- Configurable template for generating new test-suites when creating test-cases
- Wide range of assertion methods for verifying the behavior and output of your code
- Test Fuzzing support for generating random inputs to test edge cases and boundary conditions
- Parameterized Tests (Test Cases) for testing functions with multiple sets of inputs and expected outputs
- Scene runner for simulating different kinds of inputs and actions, such as mouse clicks and keyboard inputs<br> For example, you can simulate mouse clicks and keyboard inputs by calling the appropriate methods on the runner instance. Additionally, you can wait for a specific signal to be emitted by the scene, or you can wait for a specific function to return a certain value.
Short Example
namespace GdUnit4.Tests
{
using static Assertions;
[TestSuite]
public class StringAssertTest
{
[TestCase]
public void IsEqual()
{
AssertThat("This is a test message").IsEqual("This is a test message");
}
}
}
You are welcome to:
Thank you for supporting my project!
Sponsors:
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 was computed. 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 was computed. 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.
-
net7.0
- CommandLineParser (>= 2.9.1)
- Godot.SourceGenerators (>= 4.2.1)
- GodotSharp (>= 4.2.1)
- Microsoft.CodeAnalysis.CSharp (>= 4.7.0)
- Moq (>= 4.18.4)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on gdUnit4.api:
Package | Downloads |
---|---|
gdUnit4.test.adapter
GdUnit4 Test Adapter is the test adapter to run GdUnit4 tests in C#. |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on gdUnit4.api:
Repository | Stars |
---|---|
Revolutionary-Games/Thrive
The main repository for the development of the evolution game Thrive.
|
|
MikeSchulze/gdUnit4Net
Official C# implementation of GDUnit4 - a comprehensive unit testing framework for Godot 4. Features VS/Rider test adapter integration, parameterized tests, scene runners, and extensive assertion methods.
|
GdUnit4 API release candidate.