Revert "removing tests because they might break the solution"

This reverts commit 3a21f00528.
This commit is contained in:
2026-03-08 09:44:02 +01:00
parent ddc85655be
commit 8153ec07e7
25 changed files with 837 additions and 0 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();
}
}