Пример #1
0
 public void GetColorNaNTest()
 {
     IProjectionGridMap projectionGridMap = new MockClasses.MockProjectionGridMap();
     ImageColorMap target = new ImageColorMap(projectionGridMap);
     Color actual = target.GetColor(double.NaN, double.NaN);
     Assert.AreEqual(Color.Transparent, actual);
 }
Пример #2
0
        public void GetColorNaNTest()
        {
            IProjectionGridMap projectionGridMap = new MockClasses.MockProjectionGridMap();
            ImageColorMap      target            = new ImageColorMap(projectionGridMap);
            Color actual = target.GetColor(double.NaN, double.NaN);

            Assert.AreEqual(Color.Transparent, actual);
        }
Пример #3
0
 public void GetColorTest()
 {
     IProjectionGridMap projectionGridMap = new MockClasses.MockProjectionGridMap();
     ImageColorMap target = new ImageColorMap(projectionGridMap);
     double longitude = 200;
     double latitude = 400;
     Color expected = Color.FromArgb(0, 0, 2, 88);
     Color actual = target.GetColor(longitude, latitude);
     Assert.AreEqual(expected, actual);
 }
Пример #4
0
        public void GetColorTest()
        {
            IProjectionGridMap projectionGridMap = new MockClasses.MockProjectionGridMap();
            ImageColorMap      target            = new ImageColorMap(projectionGridMap);
            double             longitude         = 200;
            double             latitude          = 400;
            Color expected = Color.FromArgb(0, 0, 2, 88);
            Color actual   = target.GetColor(longitude, latitude);

            Assert.AreEqual(expected, actual);
        }
Пример #5
0
        public void GetColorTest()
        {
            string              colorMapFile      = Path.Combine(TestDataPath, "ColorMap.png");
            IProjectionGridMap  projectionGridMap = new MockClasses.MockProjectionGridMap();
            ColorMapOrientation orientation       = ColorMapOrientation.Vertical;
            double              minimumValue      = double.MinValue;
            double              maximumValue      = double.MaxValue;
            DataColorMap        target            = new DataColorMap(colorMapFile, projectionGridMap, orientation, minimumValue, maximumValue);
            Color expectedColor = Color.FromArgb(255, 164, 169, 230);
            Color actual        = target.GetColor(200, 400);

            Assert.AreEqual(expectedColor, actual);
        }
Пример #6
0
 public void GetNaNColorTest()
 {
     try
     {
         string              colorMapFile      = Path.Combine(TestDataPath, "ColorMap.png");
         IProjectionGridMap  projectionGridMap = new MockClasses.MockProjectionGridMap();
         ColorMapOrientation orientation       = ColorMapOrientation.Vertical;
         double              minimumValue      = double.MinValue;
         double              maximumValue      = double.MaxValue;
         DataColorMap        target            = new DataColorMap(colorMapFile, projectionGridMap, orientation, minimumValue, maximumValue);
         Color color = target.GetColor(double.NaN, double.NaN);
         Assert.AreEqual(color, Color.Transparent);
     }
     catch (Exception ex)
     {
         Assert.Fail(ex.Message);
     }
 }