public void ConvertToKml()
 {
     var testObject = new TestObject() { TestAsDescription = "Description", TestAsTitle = "Title", TestAsGeometry = GeoUtils.CreatePoint(10, 5) };
     GeoKmlConverter converter = new GeoKmlConverter();
     var xml = converter.ConvertToGeoKml<TestObject>(testObject);
     StringAssert.StartsWith(xml, "<?xml");
 }
 public void ConvertToKml_With_Style_From_Enum()
 {
     var testObject = new TestObject2() { TestAsDescription = "Description", TestAsTitle = "Title", TestAsGeometry = GeoUtils.CreatePoint(10, 5), TestAsStyle = StyleName.Stefania };
     GeoKmlConverter converter = new GeoKmlConverter();
     var xml = converter.ConvertToGeoKml<TestObject2>(testObject);
     xml.Should().Contain("#stefania");
 }
 public void ConvertListToKml()
 {
     var testObject = new TestObject() { TestAsDescription = "Description", TestAsTitle = "Title", TestAsGeometry = GeoUtils.CreatePoint(10, 5) };
     var testObject2 = new TestObject() { TestAsDescription = "Description2", TestAsTitle = "Title2", TestAsGeometry = GeoUtils.CreatePoint(10, 5) };
     List<TestObject> objects = new List<TestObject>() { testObject, testObject2 };
     GeoKmlConverter converter = new GeoKmlConverter();
     var xml = converter.ConvertToGeoKml<List<TestObject>>(objects);
     StringAssert.StartsWith(xml, "<?xml");
 }
 public void ConvertToKml_With_Style_And_Definitions()
 {
     var style = new PictureMarkerSymbol();
     style.Name = "Stefania";
     style.IconUri = "http://www.basketbalnieuws.nl/kml/supermarket.png";
     style.Scale = 1.1;
     var testObject = new TestObject() { TestAsDescription = "Description", TestAsTitle = "Title", TestAsGeometry = GeoUtils.CreatePoint(52.574047699999994, 6.285734400000001), TestAsStyle = "Stefania" };
     GeoKmlConverter converter = new GeoKmlConverter();
     var xml = converter.ConvertToGeoKml<TestObject>(testObject, new List<ISymbol>() { style });
     xml.Should().Contain("#stefania");
 }
Beispiel #5
0
        public void ConvertToKml()
        {
            var testObject = new TestObject()
            {
                TestAsDescription = "Description", TestAsTitle = "Title", TestAsGeometry = GeoUtils.CreatePoint(10, 5)
            };
            GeoKmlConverter converter = new GeoKmlConverter();
            var             xml       = converter.ConvertToGeoKml <TestObject>(testObject);

            StringAssert.StartsWith(xml, "<?xml");
        }
Beispiel #6
0
        public void ConvertToKml_With_Style_From_Enum()
        {
            var testObject = new TestObject2()
            {
                TestAsDescription = "Description", TestAsTitle = "Title", TestAsGeometry = GeoUtils.CreatePoint(10, 5), TestAsStyle = StyleName.Stefania
            };
            GeoKmlConverter converter = new GeoKmlConverter();
            var             xml       = converter.ConvertToGeoKml <TestObject2>(testObject);

            xml.Should().Contain("#stefania");
        }
Beispiel #7
0
        public void ConvertListToKml()
        {
            var testObject = new TestObject()
            {
                TestAsDescription = "Description", TestAsTitle = "Title", TestAsGeometry = GeoUtils.CreatePoint(10, 5)
            };
            var testObject2 = new TestObject()
            {
                TestAsDescription = "Description2", TestAsTitle = "Title2", TestAsGeometry = GeoUtils.CreatePoint(10, 5)
            };
            List <TestObject> objects = new List <TestObject>()
            {
                testObject, testObject2
            };
            GeoKmlConverter converter = new GeoKmlConverter();
            var             xml       = converter.ConvertToGeoKml <List <TestObject> >(objects);

            StringAssert.StartsWith(xml, "<?xml");
        }
Beispiel #8
0
        public void ConvertToKml_With_Style_And_Definitions()
        {
            var style = new PictureMarkerSymbol();

            style.Name    = "Stefania";
            style.IconUri = "http://www.basketbalnieuws.nl/kml/supermarket.png";
            style.Scale   = 1.1;
            var testObject = new TestObject()
            {
                TestAsDescription = "Description", TestAsTitle = "Title", TestAsGeometry = GeoUtils.CreatePoint(52.574047699999994, 6.285734400000001), TestAsStyle = "Stefania"
            };
            GeoKmlConverter converter = new GeoKmlConverter();
            var             xml       = converter.ConvertToGeoKml <TestObject>(testObject, new List <ISymbol>()
            {
                style
            });

            xml.Should().Contain("#stefania");
        }
 public void Setup()
 {
     _kmlConverter = new GeoKmlConverter();
 }
Beispiel #10
0
 public void Setup()
 {
     _kmlConverter = new GeoKmlConverter();
 }