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); }
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); }
public void FileReader_FeatureClasses_StreamOverload() { using (var s = File.OpenRead(@"testdata\test_featureclasses_en.txt")) GeoFileReader.ReadFeatureClasses(s).Count(); }