Beispiel #1
0
        public void ToStringTest()
        {
            var mapStyle = new MapStyle();

            var toString = mapStyle.ToString();

            Assert.IsNull(toString);
        }
Beispiel #2
0
        public IStructureFactory Create(MapStyle style)
        {
            switch (style)
            {
            case MapStyle.Style1:
                return(new Style1StructureFactory());

            case MapStyle.Style2:
                return(new Style2StructureFactory());

            default:
                throw new NotImplementedException($"{style.ToString()} structure type is not supported");
            }
        }
Beispiel #3
0
        public void ToStringWhenStyleIsNotNullTest()
        {
            var mapStyle = new MapStyle
            {
                Feature = StyleFeature.Administrative,
                Element = StyleElement.Geometry,
                Style   = new StyleRule
                {
                    Color = "color"
                }
            };

            var toString = mapStyle.ToString();

            Assert.AreEqual($"feature:{mapStyle.Feature.ToEnumMemberString()}|element:{mapStyle.Element.ToEnumMemberString()}|{mapStyle.Style}", toString);
        }
Beispiel #4
0
        public void ToStringWhenStyleIsNotNullAndComplexTest()
        {
            var mapStyle = new MapStyle
            {
                Feature = StyleFeature.Administrative_Land_Parcel,
                Element = StyleElement.Labels_Text_Stroke,
                Style   = new StyleRule
                {
                    Hue             = "hue",
                    Lightness       = 10,
                    Saturation      = 10,
                    Gamma           = 1,
                    InvertLightness = true,
                    Visibility      = StyleVisibility.Simplified,
                    Color           = "color",
                    Weight          = 1
                }
            };

            var toString = mapStyle.ToString();

            Assert.AreEqual($"feature:{mapStyle.Feature.ToEnumMemberString()}|element:{mapStyle.Element.ToEnumMemberString()}|{mapStyle.Style}", toString);
        }