Repository navigation
Test box rolls, mall delivery, potion cooldown and fairy bead services - #3983
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 21 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Review: MERGE-WITH-NOTE Tests only. Checked against test/README.md: services are built with Fixed (81e191f): Left: nothing blocking. Screenshots: not applicable (no client-visible change). 🤖 Generated with Claude Code Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CUfJ48hKBkfBmXgYEM4zzF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CUfJ46QwPdyxP5Y24i6H1i
81e191f to
1863f2c
Compare
Adds service-level tests for four
NosCore.GameObjectservices that had no test class of their own. They were only reached through the handlers that call them, so several branches were never run.BoxRollService(8 tests): rows outside the box's rare range, design or with no chance are left out. The roll lands in the set its weight points at. A set gives all its lines, ordered by item. A class box keeps only the sets that fit the opener's gender, and an ordinary box keeps every set.MallDeliveryService(5 tests): pending items go out oldest purchase first, with one thanks message each. Another character's items and already-delivered items are left alone. When a mail fails, the item stays pending and no thanks message is sent, and the next sync delivers it.PotionCooldownService(4 tests): the 300 ms default on a map with no type. A map with two types uses the longer delay. A delay set on another map's type is ignored. A delay shorter than the default applies.FairyBeadService(8 tests): storing a fairy keeps its level and the character it is bound to. Storing is refused while running a shop, from a pocket other than equipment, and into a specialist holder.IsFairyBeadis checked for both kinds of holder. Taking a fairy out leaves the bead unchanged. Taking one out of an empty bead throws.No production code changed; none of the tests found a bug.
None of these overlap with the areas other open PRs are testing (item handlers, mate control, partner specialists, login, group, family, bazaar, bin, friends, notes, master registry, hub clients, upgrades, trades).
Test results
dotnet test test/NosCore.GameObject.Tests: 3660 passed, 0 failed, 0 skipped (25 of them new).These tests only check the services' logic. They do not verify any gameplay behaviour in a client.
Generated by Claude Code