refactor(app): compose settings and developer tools
This commit is contained in:
parent
60a1698ce7
commit
cd7b519f78
24 changed files with 2073 additions and 333 deletions
59
tests/AcDream.App.Tests/Combat/CombatFeedbackSlotTests.cs
Normal file
59
tests/AcDream.App.Tests/Combat/CombatFeedbackSlotTests.cs
Normal 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());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue