Resolve all 46 low-severity architecture review findings

This commit is contained in:
Joseph Doherty
2026-09-09 22:56:36 -04:00
parent fef3e7675f
commit 9ee402bbcd
139 changed files with 2621 additions and 1082 deletions
@@ -0,0 +1,22 @@
using System.Reflection;
namespace ZB.MOM.WW.ScadaBridge.ManagementService.Tests;
public class ManagementPagingBoundaryTests
{
[Theory]
[InlineData(null, 1100)]
[InlineData(-1, 1100)]
[InlineData(0, 1100)]
[InlineData(1, 1)]
[InlineData(1000, 1000)]
[InlineData(1001, 1000)]
[InlineData(int.MaxValue, 1000)]
public void PositiveTakeIsCapped_OmittedOrNonpositiveTakePreservesUnlimited(int? take, int expected)
{
var page = typeof(ManagementActor).GetMethod("Page", BindingFlags.Static | BindingFlags.NonPublic)!.MakeGenericMethod(typeof(int));
var rows = (List<int>)page.Invoke(null, [Enumerable.Range(0, 1100), -1, take])!;
Assert.Equal(expected, rows.Count);
Assert.Equal(0, rows[0]);
}
}