refactor(D.5.2): hoist UiEffectsPropertyId to fields + use it in tests (review polish)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
77f64d7925
commit
5a2af61508
2 changed files with 7 additions and 5 deletions
|
|
@ -158,10 +158,10 @@ public sealed class ItemRepositoryTests
|
|||
repo.AddOrUpdate(new ItemInstance { ObjectId = 0x500000ABu });
|
||||
ItemInstance? fired = null;
|
||||
repo.ItemPropertiesUpdated += i => fired = i;
|
||||
bool ok = repo.UpdateIntProperty(0x500000ABu, 18u, value: 0x9); // 18 = UiEffects
|
||||
bool ok = repo.UpdateIntProperty(0x500000ABu, ItemRepository.UiEffectsPropertyId, value: 0x9);
|
||||
Assert.True(ok);
|
||||
Assert.Equal(0x9u, repo.GetItem(0x500000ABu)!.Effects);
|
||||
Assert.Equal(0x9, repo.GetItem(0x500000ABu)!.Properties.Ints[18u]);
|
||||
Assert.Equal(0x9, repo.GetItem(0x500000ABu)!.Properties.Ints[ItemRepository.UiEffectsPropertyId]);
|
||||
Assert.NotNull(fired);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue