<commit_before>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DotSpatial.Data;
using DotSpatial.Topology;
using DotSpatial.Mono;
using System.IO;
using System.Diagnostics;
using NUnit.Framework;

namespace ReadWriteTest
{
    [TestFixture]
    public class ReadWriteTest
    {
        [Test]
        public void ShapefilesTest()
        {
            List<IFeatureSet> originals = new List<IFeatureSet>();
            List<IFeatureSet> monoSaves = new List<IFeatureSet>();
            String testsFolder = Path.Combine(new String[] { "..", "..", "..", "DotSpatial.Data.Tests", "Data", "Shapefiles" });
            String monoFolder = Path.Combine(new String[] { testsFolder, "monoTests" });

            String[] files = Directory.GetFiles(testsFolder, "*.shp");

            foreach (String file in files)
            {
                IDataSet dataset = DataManager.DefaultDataManager.OpenFile(file);
                IFeatureSet fs = (IFeatureSet)dataset;
                if (Mono.IsRunningOnMono())
                {
                    fs.Filename = Path.Combine(new String[] { monoFolder, Path.GetFileName(file) });
                    fs.Save();
                }
                originals.Add(fs);
            }

            String[] monoTests = Directory.GetFiles(monoFolder, "*.shp");

            foreach (String file in monoTests)
            {
                IDataSet dataset = DataManager.DefaultDataManager.OpenFile(file);
                IFeatureSet fs = (IFeatureSet)dataset;
                monoSaves.Add(fs);
            }

            Assert.AreEqual(originals.Count, monoSaves.Count);

            for (int i = 0; i < monoSaves.Count; i+=2)
            {
                IFeatureSet currOriginal = originals.ElementAt(i);
                IFeatureSet currMono = monoSaves.ElementAt(i);

                Assert.AreEqual(currOriginal.Features.Count, currMono.Features.Count);

                for (int j = 0; j < currOriginal.Features.Count; j+=100)
                {
                    Assert.AreEqual(currOriginal.Features.ElementAt(j).Coordinates, currMono.Features.ElementAt(j).Coordinates);
                }
            }
        }
    }
}<commit_msg>Fixed shapefiles test so that it runs now.<commit_after>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DotSpatial.Data;
using DotSpatial.Topology;
using DotSpatial.Mono;
using System.IO;
using System.Diagnostics;
using NUnit.Framework;

namespace ReadWriteTest
{
    [TestFixture]
    public class ReadWriteTest
    {
        [Test]
        public void PolygonShapeFile()
        {
            String filename = "counties.shp";
            String folder = Path.Combine(new String[] { "..", "..", "..", "DotSpatial.Data.Tests", "Data", "Shapefiles" });
            
            String testFile = Path.Combine(new String[] { folder, filename });
            String monoFile = Path.Combine(new String[] { folder, "monoTests", filename });

            IFeatureSet original = (IFeatureSet)DataManager.DefaultDataManager.OpenFile(testFile);;

            if (Mono.IsRunningOnMono())
            {
                original.Filename = monoFile;
                original.Save();
            }

            IFeatureSet monoSave = (IFeatureSet)DataManager.DefaultDataManager.OpenFile(monoFile);

            Assert.AreEqual(original.Features.Count, monoSave.Features.Count);

            for (int j = 0; j < original.Features.Count; j+=100)
            {
                Assert.AreEqual(original.Features.ElementAt(j).Coordinates, monoSave.Features.ElementAt(j).Coordinates);
            }
        }

        [Test]
        public void PointShapeFile()
        {
            String filename = "cities.shp";
            String folder = Path.Combine(new String[] { "..", "..", "..", "DotSpatial.Data.Tests", "Data", "Shapefiles" });

            String testFile = Path.Combine(new String[] { folder, filename });
            String monoFile = Path.Combine(new String[] { folder, "monoTests", filename });

            IFeatureSet original = (IFeatureSet)DataManager.DefaultDataManager.OpenFile(testFile); ;

            if (Mono.IsRunningOnMono())
            {
                original.Filename = monoFile;
                original.Save();
            }

            IFeatureSet monoSave = (IFeatureSet)DataManager.DefaultDataManager.OpenFile(monoFile);

            Assert.AreEqual(original.Features.Count, monoSave.Features.Count);

            for (int j = 0; j < original.Features.Count; j+=100)
            {
                Assert.AreEqual(original.Features.ElementAt(j).Coordinates, monoSave.Features.ElementAt(j).Coordinates);
            }
        }

        [Test]
        public void LineShapeFile()
        {
            String filename = "rivers.shp";
            String folder = Path.Combine(new String[] { "..", "..", "..", "DotSpatial.Data.Tests", "Data", "Shapefiles" });

            String testFile = Path.Combine(new String[] { folder, filename });
            String monoFile = Path.Combine(new String[] { folder, "monoTests", filename });

            IFeatureSet original = (IFeatureSet)DataManager.DefaultDataManager.OpenFile(testFile); ;

            if (Mono.IsRunningOnMono())
            {
                original.Filename = monoFile;
                original.Save();
            }

            IFeatureSet monoSave = (IFeatureSet)DataManager.DefaultDataManager.OpenFile(monoFile);

            Assert.AreEqual(original.Features.Count, monoSave.Features.Count);

            for (int j = 0; j < original.Features.Count; j+=100)
            {
                Assert.AreEqual(original.Features.ElementAt(j).Coordinates, monoSave.Features.ElementAt(j).Coordinates);
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.11786085150571132, 'fraction_numerical': 0.003115264797507788, 'mean_word_length': 2.0625331213566507, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3676564', 'n_tokens_mistral': 1686, 'n_tokens_neox': 1581, 'n_words': 297}