acdream/tests/AcDream.Core.Tests/Items/ItemCooldownDisplayTests.cs
Erik 6b1ae4fb76 feat(items): port retail shared cooldown overlays
Preserve public shared-cooldown metadata, resolve the authoritative cooldown enchantment with retail expiry semantics, and project the exact ten DAT-authored radial steps through the shared retained item-slot architecture.

Co-authored-by: Codex <codex@openai.com>
2026-07-23 10:41:16 +02:00

22 lines
597 B
C#

using AcDream.Core.Items;
namespace AcDream.Core.Tests.Items;
public sealed class ItemCooldownDisplayTests
{
[Theory]
[InlineData(10.0, 10.0, 10)]
[InlineData(10.0, 9.0, 10)]
[InlineData(10.0, 8.999, 9)]
[InlineData(10.0, 5.0, 6)]
[InlineData(10.0, 0.001, 1)]
[InlineData(10.0, 0.0, 0)]
[InlineData(0.0, 5.0, 0)]
public void GetOverlayStep_matches_retail_truncation(
double duration,
double remaining,
int expected)
=> Assert.Equal(
expected,
ItemCooldownDisplay.GetOverlayStep(duration, remaining));
}