public virtual void SetColorValueIncorrectComponentsNumberTest() { NUnit.Framework.Assert.That(() => { float[] colorValues = new float[] { 0.0f, 0.5f, 0.1f }; Color color = Color.MakeColor(PdfColorSpace.MakeColorSpace(PdfName.DeviceRGB), colorValues); color.SetColorValue(new float[] { 0.1f, 0.2f }); } , NUnit.Framework.Throws.InstanceOf <PdfException>().With.Message.EqualTo(PdfException.IncorrectNumberOfComponents)) ; }
public override void SetColorValue(float[] value) { base.SetColorValue(value); underlyingColor.SetColorValue(value); }