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

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

            ContrastConfig contrastConfig = DiscoveredScanner.GenerateContrastConfig(_mockSourceConfig.Object);

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

            _mockSourceConfig.Setup(x => x.MinContrast).Returns(-999);
            _mockSourceConfig.Setup(x => x.DefaultContrast).Returns(0);
            _mockSourceConfig.Setup(x => x.MaxContrast).Returns(1000);
            _mockSourceConfig.Setup(x => x.ContrastStep).Returns(1);

            ContrastConfig contrastConfig = DiscoveredScanner.GenerateContrastConfig(_mockSourceConfig.Object);

            Assert.IsNotNull(contrastConfig);
            Assert.AreEqual(contrastConfig.MinContrast, -999);
            Assert.AreEqual(contrastConfig.DefaultContrast, 0);
            Assert.AreEqual(contrastConfig.VirtualDefaultContrast, 1);
            Assert.AreEqual(contrastConfig.MaxContrast, 1000);
            Assert.AreEqual(contrastConfig.ContrastStep, 1);
        }