refactor(app): compose settings and developer tools

This commit is contained in:
Erik 2026-07-22 16:11:34 +02:00
parent 60a1698ce7
commit cd7b519f78
24 changed files with 2073 additions and 333 deletions

View file

@ -0,0 +1,59 @@
using System.Numerics;
using AcDream.App.Combat;
using AcDream.Core.Combat;
using AcDream.UI.Abstractions.Panels.Debug;
namespace AcDream.App.Tests.Combat;
public sealed class CombatFeedbackSlotTests
{
[Fact]
public void ExpectedOwnerUnbindCannotClearReplacement()
{
var slot = new CombatFeedbackSlot();
using DebugVM first = CreateViewModel();
using DebugVM second = CreateViewModel();
slot.Bind(first);
slot.Unbind(second);
slot.Show("first");
Assert.Single(first.RecentToasts);
Assert.Empty(second.RecentToasts);
slot.Unbind(first);
slot.Bind(second);
slot.Show("second");
Assert.Single(second.RecentToasts);
}
private static DebugVM CreateViewModel() => new(
static () => Vector3.Zero,
static () => 0,
static () => 0,
static () => false,
static () => false,
static () => false,
static () => 0,
static () => 0,
static () => 0,
static () => 0,
static () => 0,
static () => 0,
static () => float.PositiveInfinity,
static () => "-",
static () => false,
static () => false,
static () => 0,
static () => 1,
static () => 0,
static () => false,
static () => "0",
static () => 0,
static () => "Clear",
static () => 0,
static () => 0,
static () => 0,
static () => 60,
static () => 16.7f,
new CombatState());
}