Esempio n. 1
0
        public void RenderLabels()
        {
            // arrange
            var          map      = ArrangeRenderingTests.Labels();
            const string fileName = "labels.png";

            // act
            var bitmap = new MapRenderer().RenderToBitmapStream(map.Viewport, map.Layers);

            // aside;
            File.WriteToGeneratedFolder(fileName, bitmap);

            // assert
            Assert.IsTrue(CompareBitmaps(File.ReadFromOriginalFolder(fileName), bitmap));
        }
Esempio n. 2
0
        public void RenderLabels()
        {
            // arrange
            var          map      = ArrangeRenderingTests.Labels();
            const string fileName = "labels.png";

            // act
            var bitmap = new MapRenderer().RenderToBitmapStream(map.Viewport, map.Layers);

            // aside;
            File.Write(fileName, bitmap);

            // assert
            Assert.AreEqual(File.Read(fileName).ToArray(), bitmap.ToArray());
        }
Esempio n. 3
0
        public void RenderLabels()
        {
            // arrange
            var map = ArrangeRenderingTests.Labels();
            const string fileName = "labels.png";

            // act
            var bitmap = RenderToBitmap(map);

#if !MONOGAME
            // aside;
            if (Settings.Default.WriteToDisk) WriteFile(Path.Combine(_generatedImagesFolder, fileName), bitmap);

            // assert
            Assert.AreEqual(ReadFile(Path.Combine(_originalImagesFolder, fileName)), bitmap.ToArray());
#endif
        }