public void Convert_WithDto_CreatesPhoto() { var converter = new PhotoConverter(_conversions); var body = "Canon 6D"; var aperture = 4; var shutterSpeed = 200; var focalLength = 35; var lens = "EF 35mm"; var isoSpeedRating = 100; var photo = converter.Convert(new PhotoDto { Body = body, DateYear = 2000, DateMonth = 07, DateDay = 03, Aperture = aperture, ShutterSpeed = shutterSpeed, FocalLength = focalLength, Lens = lens, IsoSpeedRating = isoSpeedRating }); photo.Body.Should().Be(body); photo.TakenAt.Should().Be(DateTime.Parse("03-July-2000")); photo.Aperture.Should().Be(aperture); photo.ShutterSpeed.Should().Be(shutterSpeed); photo.FocalLength.Should().Be(focalLength); photo.Lens.Should().Be(lens); photo.IsoSpeedRating.Should().Be(isoSpeedRating); }
public void Convert_WithBodyName_CalculatesCropMultiplier(string body, double expectedConversion) { var converter = new PhotoConverter(_conversions); converter.Convert(new PhotoDto { Body = body, DateYear = 2000, DateMonth = 07, DateDay = 03 }) .CropMultiplier .Should() .Be(expectedConversion); }