コード例 #1
0
        public void TestImageFromLocalFile()
        {
            string fileName = Path.GetTempFileName();
            Image  image    = new Bitmap(4, 4);

            image.Save(fileName);
            try
            {
                string imageName = Path.GetFileName(fileName);
                string filePath  = Path.GetDirectoryName(fileName);
                renderer       = new LinkInlineRenderer(filePath);
                inline.IsImage = true;

                Assert.DoesNotThrow(() => renderer.GetImage(imageName).Dispose());
            }
            finally
            {
                File.Delete(fileName);
            }
        }
コード例 #2
0
 public void TestImageFromResource(string resourceName)
 {
     Assert.DoesNotThrow(() => renderer.GetImage(resourceName).Dispose());
 }