public void GetHorizonImageBoundaryTest()
        {
            ImageLogic images = new ImageLogic();

            images.GetHorizonImage(-1000, 20, 359);
            images.GetHorizonImage(1000, 20, 359);

            images.GetHorizonImage(-10, 2000, 359);
            images.GetHorizonImage(10, -2000, 359);

            images.GetHorizonImage(-10, 20, 3000);
            images.GetHorizonImage(10, -20, -3000);
        }
Пример #2
0
        public void GetHorizonImageTest()
        {
            ImageLogic images = new ImageLogic();

            string result = images.GetHorizonImage(-10, 20, 359);

            var path = @"Images\horizon.png";

            if (File.Exists(path))
            {
                File.Delete(path);
            }

            using (FileStream fs = File.Create(path))
            {
                var bytes = Convert.FromBase64String(result.Substring(23));
                fs.Write(bytes, 0, bytes.Length);
            }
        }