40 references to s_anyEncoder
System.Drawing.Common.Tests (40)
System\Drawing\Imaging\EncoderParameterTests.cs (40)
51EncoderParameter ep = new(s_anyEncoder, 0, undefined); 52CheckEncoderParameter(ep, s_anyEncoder, expected, 1); 61using EncoderParameter ep = new(s_anyEncoder, value); 62CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeShort, 1); 71using EncoderParameter ep = new(s_anyEncoder, value); 72CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeLong, 1); 81using EncoderParameter ep = new(s_anyEncoder, numerator, denominator); 82CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeRational, 1); 90using EncoderParameter ep = new(s_anyEncoder, numerator1, denominator1, numerator2, denominator2); 91CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeRationalRange, 1); 99using EncoderParameter ep = new(s_anyEncoder, rangeBegin, rangeEnd); 100CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeLongRange, 1); 108using EncoderParameter ep = new(s_anyEncoder, value); 109CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeAscii, value.Length); 117using EncoderParameter ep = new(s_anyEncoder, value); 118CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeByte, value.Length); 126using EncoderParameter ep = new(s_anyEncoder, value, undefined); 127CheckEncoderParameter(ep, s_anyEncoder, expected, value.Length); 135using EncoderParameter ep = new(s_anyEncoder, value); 136CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeShort, value.Length); 144using EncoderParameter ep = new(s_anyEncoder, value); 145CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeLong, value.Length); 152using EncoderParameter ep = new(s_anyEncoder, numerator, denominator); 153CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeRational, numerator.Length); 160using EncoderParameter ep = new(s_anyEncoder, rangeBegin, rangeEnd); 161CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeLongRange, rangeBegin.Length); 168using EncoderParameter ep = new(s_anyEncoder, numerator1, denominator1, numerator2, denominator2); 169CheckEncoderParameter(ep, s_anyEncoder, EncoderParameterValueType.ValueTypeRationalRange, numerator1.Length); 192using EncoderParameter ep = new(s_anyEncoder, numberOfValues, type, value); 193CheckEncoderParameter(ep, s_anyEncoder, type, numberOfValues); 200using EncoderParameter ep = new(s_anyEncoder, 0) 210Assert.Throws<InvalidOperationException>(() => new EncoderParameter(s_anyEncoder, 1, (EncoderParameterValueType)999, IntPtr.Zero)); 222Assert.Throws(expected, () => new EncoderParameter(s_anyEncoder, numerator1, denominator1, numerator2, denominator2)); 228using EncoderParameter ep = new(s_anyEncoder, 0); 239Assert.Throws(expected, () => new EncoderParameter(s_anyEncoder, numerator, denominator)); 249Assert.Throws(expected, () => new EncoderParameter(s_anyEncoder, rangeBegin, rangeEnd)); 255Assert.Throws<NullReferenceException>(() => new EncoderParameter(s_anyEncoder, (string)null)); 261Assert.Throws<NullReferenceException>(() => new EncoderParameter(s_anyEncoder, (byte[])null)); 310Assert.Throws(expected, () => new EncoderParameter(s_anyEncoder, numberOfValues, type, IntPtr.Zero)); 322Assert.Throws<OutOfMemoryException>(() => new EncoderParameter(s_anyEncoder, numberOfValues, anyType, anyValue));