public void AvailableIsoSpeedsTest() { IsoSpeedEnum[] isoSpeeds = new[] { IsoSpeedEnum.iso800, IsoSpeedEnum.iso6 }; ConfigureMockCamera(null, null, null, isoSpeeds, new ApertureEnum[] { }, new ExposalEnum[] { }, new ImageQualityEnum[] { }, IsoSpeedEnum.iso6, ApertureEnum.f0, ExposalEnum.tBulb, ImageQualityEnum.PPT_sRAW1); CameraInfo cameraInfo = new CameraInfo(_camera); Assert.AreEqual(isoSpeeds.Length, cameraInfo.AvailableIsoSpeeds.Count); Assert.That(cameraInfo.AvailableIsoSpeeds, NUnit.Framework.Has.Member(IsoSpeed.With(isoSpeeds[0]))); Assert.That(cameraInfo.AvailableIsoSpeeds, NUnit.Framework.Has.Member(IsoSpeed.With(isoSpeeds[1]))); _mockery.VerifyAllExpectationsHaveBeenMet(); }
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(); }
public void EqualityTest() { Assert.AreEqual(IsoSpeed.IsoSpeeds[(int)IsoSpeedEnum.iso800], IsoSpeed.With(IsoSpeedEnum.iso800)); }
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()); }