Updated scanner to infer when it has reached the end of results.
All checks were successful
ci / build-test (push) Successful in 2m18s
ci / publish-image (push) Has been skipped

This commit is contained in:
2026-03-07 01:26:04 -05:00
parent 1e01edf1b7
commit 62c2efab01
18 changed files with 193 additions and 79 deletions

View File

@@ -0,0 +1,17 @@
using JSMR.Application.Scanning.Contracts;
using JSMR.Application.Scanning.Ports;
using Shouldly;
namespace JSMR.Tests.Extensions;
internal static class ScannerTestExtensions
{
public static async Task<IReadOnlyList<DLSiteWork>> ScanWorksAsync(this IVoiceWorksScanner scanner, VoiceWorkScanOptions options)
{
VoiceWorkScanResult result = await scanner.ScanPageAsync(options, CancellationToken.None);
result.EndOfResults.ShouldBeFalse();
return result.Works;
}
}