Example #1
0
        private static StreetCollection ParseStreets(string path)
        {
            StreamReader  streamReader = new StreamReader(path);
            XmlSerializer serializer   = new XmlSerializer(typeof(StreetCollection));

            GovDataReader govDataReader = new GovDataReader(streamReader, serializer);

            StreetCollection streetCollection = govDataReader.ParseStreets();

            return(streetCollection);
        }
Example #2
0
        public void ShouldDeserializeStreets()
        {
            var streamReader = new StreamReader($"{Environment.CurrentDirectory}/artere_1_test.xml");
            var serializer   = new XmlSerializer(typeof(StreetCollection));

            var govDataReader = new GovDataReader(streamReader, serializer);

            var streetCollection = govDataReader.ParseStreets();

            Assert.NotEmpty(streetCollection.Streets);
        }