public void GenerateNullImageTest()
        {
            var i = new MockedImageProvider();
            var g = new ImageGenerator(i);

            var img = g.GenerateImage(null, null, null);

            Assert.Null(img);
        }
        public void GenerateNullImageTest()
        {
            var i = new MockedImageProvider();
            var g = new ImageGenerator(i);

            var img = g.GenerateImage(null, null, null);

            Assert.Null(img);
        }
        public void GenerateImageTest()
        {
            var i = new MockedImageProvider();
            var g = new ImageGenerator(i);

            var img = g.GenerateImage("reference", "topText", "bottomText");

            byte[] resultHash = null;

            using (var s = new MemoryStream())
            {
                img.Save(s, ImageFormat.Jpeg);
                s.Position = 0;
                s.Seek(0, SeekOrigin.Begin);

                using (var md5 = MD5.Create())
                {
                    resultHash = md5.ComputeHash(s);
                }
            }

            Assert.Equal(ProcessedHash, resultHash);
        }
        public void GenerateImageTest()
        {
            var i = new MockedImageProvider();
            var g = new ImageGenerator(i);

            var img = g.GenerateImage("reference", "topText", "bottomText");

            byte[] resultHash = null;

            using (var s = new MemoryStream())
            {
                img.Save(s, ImageFormat.Jpeg);
                s.Position = 0;
                s.Seek(0, SeekOrigin.Begin);

                using (var md5 = MD5.Create())
                {
                    resultHash = md5.ComputeHash(s);
                }
            }

            Assert.Equal(ProcessedHash, resultHash);
        }