Exemplo n.º 1
0
        public void AvailableExposalsTest()
        {
            ExposalEnum[] exposals = new[] { ExposalEnum.t6_stepOneThird, ExposalEnum.t1dot3 };

            ConfigureMockCamera(null, null, null, new IsoSpeedEnum[] { }, new ApertureEnum[] { }, exposals, new ImageQualityEnum[] { }, IsoSpeedEnum.iso6, ApertureEnum.f0, ExposalEnum.tBulb, ImageQualityEnum.PPT_sRAW1);

            CameraInfo cameraInfo = new CameraInfo(_camera);

            Assert.AreEqual(exposals.Length, cameraInfo.AvailableExposals.Count);
            Assert.That(cameraInfo.AvailableExposals, NUnit.Framework.Has.Member(Exposal.With(exposals[0])));
            Assert.That(cameraInfo.AvailableExposals, NUnit.Framework.Has.Member(Exposal.With(exposals[1])));

            _mockery.VerifyAllExpectationsHaveBeenMet();
        }
Exemplo n.º 2
0
        public void EnumFieldsTest()
        {
            IsoSpeedEnum     iso          = IsoSpeedEnum.iso640;
            ApertureEnum     aperture     = ApertureEnum.f72;
            ExposalEnum      exposal      = ExposalEnum.t6;
            ImageQualityEnum imageQuality = ImageQualityEnum.PPT_sRAW1;

            ConfigureMockCamera(null, null, null, new IsoSpeedEnum[] { }, new ApertureEnum[] { }, new ExposalEnum[] { }, new ImageQualityEnum[] { }, iso, aperture, exposal, imageQuality);

            CameraInfo cameraInfo = new CameraInfo(_camera);

            Assert.AreEqual(IsoSpeed.With(iso), cameraInfo.CurrentIsoSpeed);
            Assert.AreEqual(Aperture.With(aperture), cameraInfo.CurrentAperture);
            Assert.AreEqual(Exposal.With(exposal), cameraInfo.CurrentExposal);
            Assert.AreEqual(ImageQuality.With(imageQuality), cameraInfo.CurrentImageQuality);

            _mockery.VerifyAllExpectationsHaveBeenMet();
        }
Exemplo n.º 3
0
 public void ToStringTest()
 {
     Assert.AreEqual(IsoSpeed.With(IsoSpeedEnum.iso6400).DisplayString, IsoSpeed.With(IsoSpeedEnum.iso6400).ToString());
     Assert.AreEqual(Aperture.With(ApertureEnum.f9_5).DisplayString, Aperture.With(ApertureEnum.f9_5).ToString());
     Assert.AreEqual(Exposal.With(ExposalEnum.t8).DisplayString, Exposal.With(ExposalEnum.t8).ToString());
 }