// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System; using System.Reflection; namespace SixLabors.ImageSharp.Tests { /// /// Triggers passing instances which produce a blank image of size width * height. /// One instance will be passed for each the pixel format defined by the pixelTypes parameter /// public class WithBlankImagesAttribute : ImageDataAttributeBase { /// /// Triggers passing an that produces a blank image of size width * height /// /// The required width /// The required height /// The requested parameter /// Additional theory parameter values public WithBlankImagesAttribute(int width, int height, PixelTypes pixelTypes, params object[] additionalParameters) : base(null, pixelTypes, additionalParameters) { this.Width = width; this.Height = height; } /// /// Triggers passing an that produces a blank image of size width * height /// /// The member data /// The required width /// The required height /// The requested parameter /// Additional theory parameter values public WithBlankImagesAttribute(string memberData, int width, int height, PixelTypes pixelTypes, params object[] additionalParameters) : base(memberData, pixelTypes, additionalParameters) { this.Width = width; this.Height = height; } public int Width { get; } public int Height { get; } protected override string GetFactoryMethodName(MethodInfo testMethod) => "Blank"; protected override object[] GetFactoryMethodArgs(MethodInfo testMethod, Type factoryType) => new object[] { this.Width, this.Height }; } }