Migrate BusinessMgr tests to NUnit

This commit is contained in:
Andy Howard
2026-09-15 10:29:35 +01:00
parent 3f2f8c16ef
commit de07f2120f
16 changed files with 333 additions and 411 deletions
+1
View File
@@ -34,6 +34,7 @@ Last updated: 2026-09-14
| Topic | Date noted | Date started | Date completed | Outcome |
|---|---|---|---|---|
| Migrate BusinessMgr tests from MSTest to NUnit | 2026-09-14 | 2026-09-14 | 2026-09-15 | Replaced MSTest with NUnit 4.6.1, NUnit3TestAdapter 6.3.0, and NUnit.Analyzers 4.15.0 in both test projects. Converted all eight fixtures and 24 tests to NUnit's constraint-style `Assert.That` model and brought every migrated fixture into line with the repository's section-comment convention. Removed unused Portal SSDT SQL unit-testing references and targets plus one unused transitive Application Insights namespace dependency. The Control base fixture now constructs representative session data instead of passing an uninitialised null value, removing its nullable warning and ensuring its console tests exercise a valid user session. The complete solution builds with the .NET CLI; Control passes 11 tests and Portal passes 13 tests, including coverage collection. |
| Capture the pre-migration BusinessMgr build and test baseline | 2026-09-10 | 2026-09-10 | 2026-09-10 | Using SDK 10.0.401, restore succeeded. Visual Studio 18 MSBuild built the complete Debug solution successfully, including the SSDT-dependent Portal test project. The .NET CLI built all production projects and the Control tests but reports `MSB4278` for the Portal test project's Visual Studio SSDT import, so Visual Studio MSBuild remains required for that project. Common's MailKit 4.13.0 dependency reports `NU1902`; the CLI build otherwise recorded 20 compiler warnings. Control tests passed 8 of 8 and Portal tests passed 13 of 13. |
| Pin the BusinessMgr .NET 10 SDK | 2026-09-10 | 2026-09-10 | 2026-09-10 | Added `global.json` for SDK 10.0.401 with `latestPatch` roll-forward and prerelease SDKs disabled. Visual Studio MSBuild remains required for the SSDT-dependent Portal test project. |
| Migrate BusinessMgr to .NET 10 against compatible Common targets | 2026-09-10 | 2026-09-10 | 2026-09-10 | All eight BusinessMgr projects now target `net10.0`. Visual Studio 18 MSBuild restored and built the complete solution successfully with no compilation errors. Control tests passed 8 of 8 and Portal tests passed 13 of 13 on .NET 10. Package vulnerability and framework-specific package reviews are tracked separately. |