using System; using System.Linq; using Core.Common.TestUtil; using Core.Components.DotSpatial.Data; using NUnit.Framework; namespace Core.Components.DotSpatial.Test.Data { [TestFixture] public class MapDataCollectionTest { [Test] public void Constructor_NullList_ThrowsArgumentNullException() { // Call TestDelegate test = () => new MapDataCollection(null); // Assert TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, "A list collection is required when creating MapDataCollection."); } [Test] public void Constructor_ListSet_InstanceWithListSet() { // Setup var list = Enumerable.Empty().ToList(); // Call var collection = new MapDataCollection(list); // Assert Assert.IsInstanceOf(collection); Assert.AreSame(list, collection.List); } } }