ModernUO/Projects/UOContent.Tests
Kamron Batman 1b0bdcf609 fix(accounts): restore AccountSecurity.CurrentAlgorithm after each test case
AccountPasswordTests mutates the process-wide AccountSecurity.CurrentAlgorithm
static in every test case and never restored it. The class shares the
"Sequential UOContent Tests" collection with ~45 other test classes;
DisableParallelization serialises them but gives no isolation between classes,
so whichever algorithm a case last set leaked into whatever ran next. Nothing
reads CurrentAlgorithm elsewhere today, but Tasks 6 and 7 add rehash tests to
this same file that will.

Capture the ambient algorithm in the constructor and restore it via
IDisposable so xUnit's per-test-case construct/dispose cycle resets it
automatically -- tests added later to this file inherit the restoration
without having to opt in.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-07 16:33:18 -07:00
..
Fixtures fix(accounts): derive the password phrase from the target algorithm 2026-08-07 16:24:37 -07:00
Tests fix(accounts): restore AccountSecurity.CurrentAlgorithm after each test case 2026-08-07 16:33:18 -07:00
UOContent.Tests.csproj fix: Bumps dependencies. (#2531) 2026-07-14 15:17:55 -07:00