public virtual void CleanUpImageEmptyAreasToCleanTest() { ImageData data = ImageDataFactory.Create(SOURCE_PATH + "cleanUpImageEmptyAreasToClean.png"); PdfImageXObject imageXObject = new PdfImageXObject(data); byte[] sourceImageBytes = imageXObject.GetImageBytes(); byte[] resultImageBytes = CleanUpImageUtil.CleanUpImage(new PdfImageXObject(data).GetImageBytes(), new List <Rectangle>()); NUnit.Framework.Assert.AreEqual(sourceImageBytes, resultImageBytes); }
public virtual void CleanUpImageNullImageBytesTest() { IList <Rectangle> areasToBeCleaned = new List <Rectangle>(); areasToBeCleaned.Add(new Rectangle(100, 100)); NUnit.Framework.Assert.That(() => { CleanUpImageUtil.CleanUpImage(null, areasToBeCleaned); } , NUnit.Framework.Throws.InstanceOf <Exception>()) ; }