public void TestGenerateBrightnessConfigInvalid()
        {
            var _mockSourceConfig = new Mock <IImageScannerSourceConfiguration>();

            _mockSourceConfig.Setup(x => x.BrightnessStep).Returns(0);

            BrightnessConfig brightnessConfig = DiscoveredScanner.GenerateBrightnessConfig(_mockSourceConfig.Object);

            Assert.IsNull(brightnessConfig);
        }
        public void TestGenerateBrightnessConfigVirtualDefaultUp()
        {
            var _mockSourceConfig = new Mock <IImageScannerSourceConfiguration>();

            _mockSourceConfig.Setup(x => x.MinBrightness).Returns(-999);
            _mockSourceConfig.Setup(x => x.DefaultBrightness).Returns(0);
            _mockSourceConfig.Setup(x => x.MaxBrightness).Returns(1000);
            _mockSourceConfig.Setup(x => x.BrightnessStep).Returns(1);

            BrightnessConfig brightnessConfig = DiscoveredScanner.GenerateBrightnessConfig(_mockSourceConfig.Object);

            Assert.IsNotNull(brightnessConfig);
            Assert.AreEqual(brightnessConfig.MinBrightness, -999);
            Assert.AreEqual(brightnessConfig.DefaultBrightness, 0);
            Assert.AreEqual(brightnessConfig.VirtualDefaultBrightness, 1);
            Assert.AreEqual(brightnessConfig.MaxBrightness, 1000);
            Assert.AreEqual(brightnessConfig.BrightnessStep, 1);
        }