From 1b8aff6b719c66c2f1695069c4ee246044ea82d2 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Sun, 19 Jul 2026 13:15:38 -0700 Subject: [PATCH] test(objects): skip weapon-itemID assertion when TileData is absent ExtractLean clamps itemID > TileData.MaxItemValue to 1; MaxItemValue is 0 when tiledata.mul is missing (CI), so Katana's 0x13FF only survives with client data. Guard with [SkippableFact] + TileDataRequirement.SkipIfMissing() like other data-dependent tests. The hue/cliloc assertion needs no data and stays a [Fact]. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../Tests/Commands/Objects/ObjectIntrospectionLeanTests.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Projects/UOContent.Tests/Tests/Commands/Objects/ObjectIntrospectionLeanTests.cs b/Projects/UOContent.Tests/Tests/Commands/Objects/ObjectIntrospectionLeanTests.cs index 935ea3cdb..5ddb65278 100644 --- a/Projects/UOContent.Tests/Tests/Commands/Objects/ObjectIntrospectionLeanTests.cs +++ b/Projects/UOContent.Tests/Tests/Commands/Objects/ObjectIntrospectionLeanTests.cs @@ -1,5 +1,6 @@ using Server.Commands; using Server.Items; +using Server.Tests; using Xunit; namespace UOContent.Tests.Commands.Objects; @@ -7,9 +8,13 @@ namespace UOContent.Tests.Commands.Objects; [Collection("Sequential UOContent Tests")] public class ObjectIntrospectionLeanTests { - [Fact] + [SkippableFact] public void ExtractLean_reads_item_id_from_a_weapon() { + // Requires client TileData: ExtractLean clamps itemID > TileData.MaxItemValue to 1, and + // MaxItemValue is 0 when tiledata.mul is absent (CI), so the real 0x13FF only survives with data. + TileDataRequirement.SkipIfMissing(); + // Katana ctor is base(0x13FF) — era-independent. var lean = ObjectIntrospection.ExtractLean(typeof(Katana)); Assert.Equal(0x13FF, lean.ItemID);