Console: Fix driver option for tests

This commit is contained in:
Ben Olden-Cooligan 2024-01-12 19:19:30 -08:00
parent 87fc65a7f6
commit ad2ba73a64
3 changed files with 6 additions and 1 deletions

View File

@ -1043,6 +1043,7 @@ public class CommandLineIntegrationTests : ContextualTests
new AutomatedScanningOptions
{
NoProfile = true,
Driver = ScanPerformer.SystemDefaultDriverName,
Device = "name1",
OutputPath = $"{FolderPath}/test.pdf",
Verbose = true
@ -1107,6 +1108,7 @@ public class CommandLineIntegrationTests : ContextualTests
}).RunCommand(
new AutomatedScanningOptions
{
Driver = ScanPerformer.SystemDefaultDriverName,
ListDevices = true
}, scanDriverFactoryMock);

View File

@ -242,7 +242,7 @@ internal class AutomatedScanning
{
var profile = new ScanProfile
{
DriverName = ScanOptionsValidator.SystemDefaultDriver.ToString().ToLowerInvariant()
DriverName = ScanPerformer.SystemDefaultDriverName
};
await SetProfileOverrides(profile);

View File

@ -26,6 +26,9 @@ internal class ScanPerformer : IScanPerformer
};
}
public static string SystemDefaultDriverName =>
ScanOptionsValidator.SystemDefaultDriver.ToString().ToLowerInvariant();
private readonly ScanningContext _scanningContext;
private readonly IDevicePrompt _devicePrompt;
private readonly Naps2Config _config;