Example #1
0
        public void LoadLocationsFromFile_Length_10()
        {
            string           dataSetFile = TestsHelper.GetTestDataFilePath("smallDataSet.csv");
            LocationImporter importer    = new LocationImporter();
            Location         location    = importer.ImportFromFile(dataSetFile);

            Assert.That(location.Locations.Length, Is.EqualTo(10));
        }
Example #2
0
        public void getNearestLocation_from_file_with_40753_entities(double latitude, double longitude, int k, string expectedNearestLocation)
        {
            string           dataSetFile     = TestsHelper.GetTestDataFilePath("cgn_bc_csv_eng.csv");
            LocationImporter importer        = new LocationImporter();
            Location         location        = importer.ImportFromFile(dataSetFile);
            string           nearestLocation = location.GetNearestLocation(latitude, longitude, k);

            Assert.That(nearestLocation, Is.EqualTo(expectedNearestLocation));
        }
Example #3
0
        public void getNearestLocation(double latitude, double longitude, int k, string expectedNearestLocation)
        {
            string           dataSetFile     = TestsHelper.GetTestDataFilePath("smallDataSet.csv");
            LocationImporter importer        = new LocationImporter();
            Location         location        = importer.ImportFromFile(dataSetFile);
            string           nearestLocation = location.GetNearestLocation(latitude, longitude, k);

            Assert.That(nearestLocation, Is.EqualTo(expectedNearestLocation));
        }