Index: Core/Common/test/Core.Common.Base.Test/ObservableCollectionWithSourcePathTest.cs =================================================================== diff -u -r5ad23eae9f87bb12cbf453126070e8967e32d7ad -r580a0557ffdf6af30593c7a94c561b353a0400cb --- Core/Common/test/Core.Common.Base.Test/ObservableCollectionWithSourcePathTest.cs (.../ObservableCollectionWithSourcePathTest.cs) (revision 5ad23eae9f87bb12cbf453126070e8967e32d7ad) +++ Core/Common/test/Core.Common.Base.Test/ObservableCollectionWithSourcePathTest.cs (.../ObservableCollectionWithSourcePathTest.cs) (revision 580a0557ffdf6af30593c7a94c561b353a0400cb) @@ -62,15 +62,15 @@ { // Setup var collection = new ObservableCollectionWithSourcePath(); - var models = new[] + var items = new[] { new object(), null, new object() }; // Call - TestDelegate call = () => collection.AddRange(models, "path"); + TestDelegate call = () => collection.AddRange(items, "path"); // Assert string message = "Collection cannot contain null."; @@ -110,7 +110,7 @@ } [Test] - public void AddRange_AddNewStochasticSoilModel_CollectionContainsModel() + public void AddRange_AddNewItem_CollectionContainsModel() { // Setup var collection = new ObservableCollectionWithSourcePath(); @@ -129,7 +129,7 @@ } [Test] - public void AddRange_AddingNewModels_CollectionContainsExpectedElements() + public void AddRange_AddingNewItems_CollectionContainsExpectedElements() { // Setup var collection = new ObservableCollectionWithSourcePath(); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/RingtoetsPipingSurfaceLineCollectionPropertiesTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/RingtoetsPipingSurfaceLineCollectionPropertiesTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/RingtoetsPipingSurfaceLineCollectionPropertiesTest.cs (revision 580a0557ffdf6af30593c7a94c561b353a0400cb) @@ -0,0 +1,88 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using System.ComponentModel; +using System.Linq; +using Core.Common.Base; +using Core.Common.Gui.PropertyBag; +using Core.Common.TestUtil; +using NUnit.Framework; +using Ringtoets.Piping.Forms.PropertyClasses; +using Ringtoets.Piping.Primitives; + +namespace Ringtoets.Piping.Forms.Test.PropertyClasses +{ + [TestFixture] + public class RingtoetsPipingSurfaceLineCollectionPropertiesTest + { + [Test] + public void Constructor_WithoutColleciton_ThrowsArgumentNullException() + { + // Call + TestDelegate test = () => new RingtoetsPipingSurfaceLineCollectionProperties(null); + + // Assert + string paramName = Assert.Throws(test).ParamName; + Assert.AreEqual("collection", paramName); + } + + [Test] + public void Constructor_WithData_ReturnExpectedValues() + { + // Setup + var someFilePath = "location/to/a/file"; + var collection = new ObservableCollectionWithSourcePath(); + collection.AddRange(Enumerable.Empty(), someFilePath); + + // Call + var properties = new RingtoetsPipingSurfaceLineCollectionProperties(collection); + + // Assert + Assert.IsInstanceOf>>(properties); + Assert.AreSame(collection, properties.Data); + Assert.AreEqual(someFilePath, properties.SourcePath); + } + + [Test] + public void Constructor_WithData_PropertiesHaveExpectedAttributesValues() + { + // Setup + var collection = new ObservableCollectionWithSourcePath(); + + // Call + var properties = new RingtoetsPipingSurfaceLineCollectionProperties(collection); + + // Assert + PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); + Assert.AreEqual(1, dynamicProperties.Count); + + PropertyDescriptor surfaceLineCollectionProperty = dynamicProperties[0]; + Assert.IsNotNull(surfaceLineCollectionProperty); + Assert.IsTrue(surfaceLineCollectionProperty.IsReadOnly); + Assert.AreEqual("Algemeen", surfaceLineCollectionProperty.Category); + Assert.AreEqual("Bronlocatie", surfaceLineCollectionProperty.DisplayName); + Assert.AreEqual( + "De locatie van het bestand waaruit de profielschematisaties zijn geïmporteerd.", + surfaceLineCollectionProperty.Description); + } + } +} \ No newline at end of file Fisheye: Tag 580a0557ffdf6af30593c7a94c561b353a0400cb refers to a dead (removed) revision in file `Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/RingtoetsSurfaceLineCollectionPropertiesTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj =================================================================== diff -u -r9d782448bb244213599d1c6f43e5a948119bdc1f -r580a0557ffdf6af30593c7a94c561b353a0400cb --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj (.../Ringtoets.Piping.Forms.Test.csproj) (revision 9d782448bb244213599d1c6f43e5a948119bdc1f) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj (.../Ringtoets.Piping.Forms.Test.csproj) (revision 580a0557ffdf6af30593c7a94c561b353a0400cb) @@ -74,7 +74,7 @@ - + Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/PipingSurfaceLinesCsvImporterTest.cs =================================================================== diff -u -rd6d1b03ce8dc3c4e6bba565a85ea310f6196adea -r580a0557ffdf6af30593c7a94c561b353a0400cb --- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/PipingSurfaceLinesCsvImporterTest.cs (.../PipingSurfaceLinesCsvImporterTest.cs) (revision d6d1b03ce8dc3c4e6bba565a85ea310f6196adea) +++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/PipingSurfaceLinesCsvImporterTest.cs (.../PipingSurfaceLinesCsvImporterTest.cs) (revision 580a0557ffdf6af30593c7a94c561b353a0400cb) @@ -52,11 +52,11 @@ [Test] public void DefaultConstructor_ExpectedValues() { - var list = new ObservableCollectionWithSourcePath(); + var collection = new ObservableCollectionWithSourcePath(); var referenceLine = new ReferenceLine(); // Call - var importer = new PipingSurfaceLinesCsvImporter(list, referenceLine, ""); + var importer = new PipingSurfaceLinesCsvImporter(collection, referenceLine, ""); // Assert Assert.IsInstanceOf>>(importer);