コード例 #1
0
            public void ThrowCOMExceptionIfDeviceNotConnected([Greedy] ScanningDevice sut)
            {
                sut.IsConnected = false;

                sut.Invoking(x => x.GetImage(ScannerSettingsCustomization.SupportedImageFormat))
                .Should().Throw <COMException>();
                sut.Images.Should().BeEmpty();
            }
コード例 #2
0
 public void ThrowIfImageFormatNotSupported([Greedy] ScanningDevice sut)
 {
     sut.Invoking(x => x.GetImage(IImagingDevice.ImageFormat.Gif))
     .Should().Throw <ArgumentException>();
     sut.Images.Should().BeEmpty();
 }