basic tests for a wider variety of files
Some checks failed
Create tag and build when new code gets to main / BumpTag (push) Successful in 20s
Create tag and build when new code gets to main / Test (push) Failing after 7m29s
Create tag and build when new code gets to main / Export (push) Successful in 8m18s

This commit is contained in:
2026-02-20 16:58:17 +01:00
parent 4474ba22fa
commit 9207295a99
28 changed files with 545 additions and 140 deletions

View File

@@ -0,0 +1,55 @@
using Godot;
using GdUnit4;
using static GdUnit4.Assertions;
using Movementtests.systems;
namespace Movementtests.tests;
[TestSuite, RequireGodotRuntime]
public class DashSystemUnitTest
{
private DashSystem _dashSystem;
[BeforeTest]
public void SetupTest()
{
_dashSystem = new DashSystem();
_dashSystem.DashCast3D = new ShapeCast3D();
_dashSystem.AddChild(_dashSystem.DashCast3D);
_dashSystem._dashCastDrop = new ShapeCast3D();
_dashSystem.AddChild(_dashSystem._dashCastDrop);
_dashSystem._dashTarget = new MeshInstance3D();
_dashSystem.AddChild(_dashSystem._dashTarget);
_dashSystem._dashDropIndicator = new MeshInstance3D();
_dashSystem.AddChild(_dashSystem._dashDropIndicator);
_dashSystem._dashDropLocationIndicator = new MeshInstance3D();
_dashSystem.AddChild(_dashSystem._dashDropLocationIndicator);
}
[AfterTest]
public void CleanupTest()
{
_dashSystem?.Free();
}
[TestCase]
public void TestStopPreparingDash()
{
_dashSystem.CanDashThroughTarget = true;
_dashSystem._dashTarget.Visible = true;
_dashSystem._dashDropIndicator.Visible = true;
_dashSystem._dashDropLocationIndicator.Visible = true;
_dashSystem.StopPreparingDash();
AssertBool(_dashSystem.CanDashThroughTarget).IsFalse();
AssertBool(_dashSystem._dashTarget.Visible).IsFalse();
AssertBool(_dashSystem._dashDropIndicator.Visible).IsFalse();
AssertBool(_dashSystem._dashDropLocationIndicator.Visible).IsFalse();
}
}