test: consolidate protocol round-trips, drop useless tests, cover item ownership #53

Merged
marco merged 1 commit from chore/test-cleanup into main 2026-07-19 00:55:18 +02:00
Owner

P3 test-quality cleanup from the code review (independent of the other PRs).

  • Merge ~18 near-identical protocol round-trip [Fact]s into two [Theory]+[MemberData] blocks (ServerMessage/ClientMessage — records round-trip by value equality). Welcome/InventoryState stay bespoke (list members = reference equality). Deletes 4 files.
  • Delete 3 useless tests: Skills_RoundTripThroughTheStore (a weaker dup of the binary-persistence round-trip that does not even flush/reload), AnimationsFor_covers_all_eight_directions (strictly subsumed by the Theory above it), MouseDeadzone_is_24_pixels (a tautological change-detector on a constant).
  • Close an authority-path gap: OwnedItemOps_RejectANonOwner — a non-owner cannot equip/drop/unequip another player's item, and her inventory is untouched.

Green: whole suite (Shared 51, GameServer 113, Client.Core 46), 0 warnings, csharpier clean. Net fewer test methods, no coverage lost, plus a new authority test.

P3 test-quality cleanup from the code review (independent of the other PRs). - **Merge** ~18 near-identical protocol round-trip `[Fact]`s into two `[Theory]`+`[MemberData]` blocks (`ServerMessage`/`ClientMessage` — records round-trip by value equality). `Welcome`/`InventoryState` stay bespoke (list members = reference equality). Deletes 4 files. - **Delete 3 useless tests**: `Skills_RoundTripThroughTheStore` (a weaker dup of the binary-persistence round-trip that does not even flush/reload), `AnimationsFor_covers_all_eight_directions` (strictly subsumed by the Theory above it), `MouseDeadzone_is_24_pixels` (a tautological change-detector on a constant). - **Close an authority-path gap**: `OwnedItemOps_RejectANonOwner` — a non-owner cannot equip/drop/unequip another player's item, and her inventory is untouched. Green: whole suite (Shared 51, GameServer 113, Client.Core 46), 0 warnings, csharpier clean. Net fewer test methods, no coverage lost, plus a new authority test.
test: consolidate protocol round-trips, drop useless tests, cover item ownership
All checks were successful
ci / Lint & Test (pull_request) Successful in 1m30s
73530c4036
- Fold ~18 near-identical protocol round-trip facts into two MemberData theories
  (records have value equality); Welcome/InventoryState stay bespoke (list members).
  Deletes ProtocolCombat/Mobiles/Items/CommandTests.
- Delete 3 useless tests: Skills_RoundTripThroughTheStore (weaker dup of the binary
  persistence test), AnimationsFor_covers_all_eight_directions (subsumed by the Theory
  above it), MouseDeadzone_is_24_pixels (change-detector on a constant).
- Add OwnedItemOps_RejectANonOwner: a non-owner can't equip/drop/unequip another
  player's item (an authority path the suite didn't cover).
marco merged commit 98defdf34e into main 2026-07-19 00:55:18 +02:00
marco deleted branch chore/test-cleanup 2026-07-19 00:55:18 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marco/IsoMmo!53
No description provided.