using System.Collections.Generic; using Deltares.Dam.Data.DataPlugins.Configuration; using NUnit.Framework; using Deltares.Dam.Data; using Deltares.Dam.Data.Importers; namespace Deltares.Dam.Tests.Importers { [TestFixture] public class LocationShapeFileImporterDotSpatialTests { [Test] public void CanReadLoactions() { const string locationFilename = @"..\..\..\data\Dam\Waterboards\HHNK All\shapefiles\LocationID.shp"; var configuredAttributes = new List(); configuredAttributes.Add(new DataAttribute{AttributeId = "location_id", AttributeName = "LOCATIONID", DataSource = ""}); configuredAttributes.Add(new DataAttribute { AttributeId = "damtype", AttributeName = "DAMTYPE", DataSource = "" }); configuredAttributes.Add(new DataAttribute { AttributeId = "dikering_id", AttributeName = "DIKERINGID", DataSource = "" }); List locations = LocationShapeFileImporterDotSpatial.ImportLocations(locationFilename, DamType.Regional, configuredAttributes); var count = locations.Count; foreach (var location in locations) { location.Dispose(); } Assert.AreEqual(5547, count); } } }