Пример #1
0
 public void invalid_xml_throws_xml_exception()
 {
     Assert.Throws <XmlException>(delegate
     {
         const string partial = "<kml><Placemark>";
         GeoJsonConvert.Convert(partial);
     });
 }
Пример #2
0
 public void partial_document_throws_xml_exception()
 {
     Assert.Throws <XmlException>(delegate
     {
         const string partial = "<kml><Placemark><name>Bora-Bora Airport</name></Point></Placemark></kml>";
         GeoJsonConvert.Convert(partial);
     });
 }
Пример #3
0
        public void minimal_kml_result_is_not_blank()
        {
            const string fileName = "borabora.kml";
            var          path     = Path.Combine(Path.GetTempPath(), fileName);

            TestServices.CreateFileFromResource("BilSimser.GeoJson.Tests.Data.borabora.kml", fileName);

            var input  = TestServices.ReadFile(fileName);
            var result = GeoJsonConvert.Convert(input);

            Assert.IsNotEmpty(result);

            TestServices.DeleteFile(fileName);
        }
Пример #4
0
 public void blank_document_throws_xml_exception()
 {
     Assert.Throws <XmlException>(() => GeoJsonConvert.Convert(string.Empty));
 }