public TestContext(IEnumerable <ImageSizeData> imageSizes, int?allowedVariance = null, ImageSizeValidationMode validationMode = ImageSizeValidationMode.All, bool?localImagesExist = true) { this.imageSizes = imageSizes; this.allowedVariance = allowedVariance; this.validationMode = validationMode; this.localImagesExist = localImagesExist == true; this.environmentServiceMock = new Mock <IEnvironmentService>(); }
public override void DefineOptions(ArgumentSyntax syntax) { base.DefineOptions(syntax); ImageSizeValidationMode mode = ImageSizeValidationMode.All; syntax.DefineOption("mode", ref mode, value => (ImageSizeValidationMode)Enum.Parse(typeof(ImageSizeValidationMode), value, true), $"Mode of validation. {EnumHelper.GetHelpTextOptions(mode)}"); Mode = mode; }