示例#1
0
        public void FeatureClassesParser_ParsesFileCorrectly()
        {
            var target = GeoFileReader.ReadFeatureClasses(@"testdata\test_featureClasses_en.txt").ToArray();

            Assert.AreEqual(1, target.Length);  //First line in file should've been skipped

            Assert.AreEqual("X", target[0].Class);
            Assert.AreEqual("Test", target[0].Description);
        }
示例#2
0
        public void FeatureClassComposer_ComposesFileCorrectly()
        {
            var src = @"testdata\test_featureClasses_en.txt";
            var dst = @"testdata\test_featureClasses_en.out.txt";

            GeoFileWriter.WriteFeatureClasses(dst, GeoFileReader.ReadFeatureClasses(src));

            FileUtil.EnsureFilesAreFunctionallyEqual(src, dst, 2, 0, new[] { '\t' }, Encoding.UTF8, true);
        }
示例#3
0
 public void FileReader_FeatureClasses_StreamOverload()
 {
     using (var s = File.OpenRead(@"testdata\test_featureclasses_en.txt"))
         GeoFileReader.ReadFeatureClasses(s).Count();
 }