public void GenerateIcon_ReturnsExpectedImage(string solutionName, string solutionPath)
        {
            var actualPath = ResolveTestPath(solutionName + ".actual.png");
            var generator  = new IconGenerator(new TinyIdGenerator());

            using (var image = generator.GenerateIcon(solutionName, solutionPath, new Size(32, 32))) {
                image.Save(actualPath, ImageFormat.Png);
            }

            AssertImages.Equal(ResolveTestPath(solutionName + ".expected.png"), actualPath);
        }
        public void ConvertIcon_ProducesExpectedImage_FromStaticFile(string inputFileName)
        {
            var actualFileName = inputFileName + ".actual.ico";

            using (var image = (Bitmap)Image.FromFile(ResolveTestPath(inputFileName))) {
                ConvertToIconAndSave(image, actualFileName);
            }

            AssertImages.Equal(
                ResolveTestPath(inputFileName + ".expected.ico"),
                ResolveTestPath(actualFileName)
                );
        }
        public void ConvertIcon_ProducesExpectedImage_FromGeneratedIcon()
        {
            var actualFileName = "_generated.actual.ico";

            using (var image = new Bitmap(32, 32)) {
                using (var graphics = Graphics.FromImage(image)) {
                    graphics.FillRectangle(Brushes.Gold, 0, 0, 32, 32);
                }

                ConvertToIconAndSave(image, actualFileName);
            }

            AssertImages.Equal(
                ResolveTestPath("_generated.expected.ico"),
                ResolveTestPath(actualFileName)
                );
        }