Index: Ringtoets.sln =================================================================== diff -u -r9388d77ee849b9474ade84716cdde573a89025e1 -rfc2878b0779c6ae4c80720910ea9fbb1b3694420 --- Ringtoets.sln (.../Ringtoets.sln) (revision 9388d77ee849b9474ade84716cdde573a89025e1) +++ Ringtoets.sln (.../Ringtoets.sln) (revision fc2878b0779c6ae4c80720910ea9fbb1b3694420) @@ -1377,6 +1377,8 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ringtoets.Piping.Integration.TestUtils.Test", "Ringtoets\Piping\test\Ringtoets.Piping.Integration.TestUtils.Test\Ringtoets.Piping.Integration.TestUtils.Test.csproj", "{070DC87D-520B-4A84-8965-ED5012875FCC}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ringtoets.Piping.IO.TestUtil.Test", "Ringtoets\Piping\test\Ringtoets.Piping.IO.TestUtil.Test\Ringtoets.Piping.IO.TestUtil.Test.csproj", "{000F1F5A-B5BC-4169-8393-15AD87A9E0CE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution CreateInstaller|x86 = CreateInstaller|x86 @@ -3456,6 +3458,14 @@ {070DC87D-520B-4A84-8965-ED5012875FCC}.Release|x86.Build.0 = Release|x86 {070DC87D-520B-4A84-8965-ED5012875FCC}.ReleaseForCodeCoverage|x86.ActiveCfg = ReleaseForCodeCoverage|x86 {070DC87D-520B-4A84-8965-ED5012875FCC}.ReleaseForCodeCoverage|x86.Build.0 = ReleaseForCodeCoverage|x86 + {000F1F5A-B5BC-4169-8393-15AD87A9E0CE}.CreateInstaller|x86.ActiveCfg = Release|x86 + {000F1F5A-B5BC-4169-8393-15AD87A9E0CE}.CreateInstallerWithDemoProject|x86.ActiveCfg = Release|x86 + {000F1F5A-B5BC-4169-8393-15AD87A9E0CE}.Debug|x86.ActiveCfg = Debug|x86 + {000F1F5A-B5BC-4169-8393-15AD87A9E0CE}.Debug|x86.Build.0 = Debug|x86 + {000F1F5A-B5BC-4169-8393-15AD87A9E0CE}.Release|x86.ActiveCfg = Release|x86 + {000F1F5A-B5BC-4169-8393-15AD87A9E0CE}.Release|x86.Build.0 = Release|x86 + {000F1F5A-B5BC-4169-8393-15AD87A9E0CE}.ReleaseForCodeCoverage|x86.ActiveCfg = ReleaseForCodeCoverage|x86 + {000F1F5A-B5BC-4169-8393-15AD87A9E0CE}.ReleaseForCodeCoverage|x86.Build.0 = ReleaseForCodeCoverage|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -3760,6 +3770,7 @@ {4A675B7E-96AD-4911-B154-85385C9330C3} = {1F0D20C2-7F04-431D-AF22-95A31FD53733} {EA3E979C-FB00-443B-B6A0-273254F24802} = {88E04195-C43E-40D3-B5F2-3A25E1E79E03} {070DC87D-520B-4A84-8965-ED5012875FCC} = {1F0D20C2-7F04-431D-AF22-95A31FD53733} + {000F1F5A-B5BC-4169-8393-15AD87A9E0CE} = {1F0D20C2-7F04-431D-AF22-95A31FD53733} EndGlobalSection GlobalSection(TextTemplating) = postSolution TextTemplating = 1 Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.TestUtil.Test/Properties/AssemblyInfo.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.TestUtil.Test/Properties/AssemblyInfo.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.TestUtil.Test/Properties/AssemblyInfo.cs (revision fc2878b0779c6ae4c80720910ea9fbb1b3694420) @@ -0,0 +1,27 @@ +// 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.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Ringtoets.Piping.IO.TestUtil.Test")] +[assembly: AssemblyProduct("Ringtoets.Piping.IO.TestUtil.Test")] +[assembly: Guid("000f1f5a-b5bc-4169-8393-15ad87a9e0ce")] \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.TestUtil.Test/Ringtoets.Piping.IO.TestUtil.Test.csproj =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.TestUtil.Test/Ringtoets.Piping.IO.TestUtil.Test.csproj (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.TestUtil.Test/Ringtoets.Piping.IO.TestUtil.Test.csproj (revision fc2878b0779c6ae4c80720910ea9fbb1b3694420) @@ -0,0 +1,94 @@ + + + + Debug + x86 + {000F1F5A-B5BC-4169-8393-15AD87A9E0CE} + Library + Properties + Ringtoets.Piping.IO.TestUtil.Test + Ringtoets.Piping.IO.TestUtil.Test + v4.0 + 512 + + + true + bin\Debug\ + 4 + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\Release\ + 4 + TRACE + true + none + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\ReleaseForCodeCoverage\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + + + + ..\..\..\..\packages\NUnit.3.6.0\lib\net40\nunit.framework.dll + True + + + + + + + Properties\GlobalAssembly.cs + + + + + + + Copying.licenseheader + + + + + + {3BBFD65B-B277-4E50-AE6D-BD24C3434609} + Core.Common.Base + + + {CE994CC9-6F6A-48AC-B4BE-02C30A21F4DB} + Ringtoets.Piping.Data + + + {35B87B7A-7F50-4139-B563-589EE522B1ED} + Ringtoets.Piping.IO + + + {955E574D-67CE-4347-AA6B-7DF8A04ED754} + Ringtoets.Piping.Data.TestUtil + + + {4A675B7E-96AD-4911-B154-85385C9330C3} + Ringtoets.Piping.IO.TestUtil + + + + + \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.TestUtil.Test/TestStochasticSoilModelUpdateModelStrategyTest.cs =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.TestUtil.Test/TestStochasticSoilModelUpdateModelStrategyTest.cs (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.TestUtil.Test/TestStochasticSoilModelUpdateModelStrategyTest.cs (revision fc2878b0779c6ae4c80720910ea9fbb1b3694420) @@ -0,0 +1,87 @@ +// 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.Collections.Generic; +using System.Linq; +using Core.Common.Base; +using NUnit.Framework; +using Ringtoets.Piping.Data; +using Ringtoets.Piping.Data.TestUtil; +using Ringtoets.Piping.IO.Importers; + +namespace Ringtoets.Piping.IO.TestUtil.Test +{ + [TestFixture] + public class TestStochasticSoilModelUpdateModelStrategyTest + { + [Test] + public void DefaultConstructor_CreatesNewInstance() + { + // Call + var strategy = new TestStochasticSoilModelUpdateModelStrategy(); + + // Assert + Assert.IsInstanceOf(strategy); + } + + [Test] + public void UpdateModelWithImportedData_WithoutSettingUpdatedInstances_SetPropertiesAndReturnSetUpdatedInstances() + { + // Setup + var strategy = new TestStochasticSoilModelUpdateModelStrategy(); + IEnumerable readModels = new[] + { + new TestStochasticSoilModel("A"), + new TestStochasticSoilModel("B"), + new TestStochasticSoilModel("C") + }; + var filePath = new string('x', new Random(21).Next(5, 23)); + + // Call + strategy.UpdateModelWithImportedData(new StochasticSoilModelCollection(), readModels, filePath); + + // Assert + Assert.IsTrue(strategy.Updated); + CollectionAssert.AreEqual(readModels, strategy.ReadModels); + Assert.AreEqual(filePath, strategy.FilePath); + Assert.IsEmpty(strategy.UpdatedInstances); + } + + [Test] + public void UpdateModelWithImportedData_UpdatedInstancesSet_ReturnsSetUpdatedInstances() + { + // Setup + var strategy = new TestStochasticSoilModelUpdateModelStrategy(); + IEnumerable readModels = Enumerable.Empty(); + var filePath = new string('x', new Random(21).Next(5, 23)); + + IEnumerable updatedInstances = Enumerable.Empty(); + strategy.UpdatedInstances = updatedInstances; + + // Call + IEnumerable updatedData = strategy.UpdateModelWithImportedData(new StochasticSoilModelCollection(), readModels, filePath); + + // Assert + Assert.AreSame(updatedInstances, updatedData); + } + } +} \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.TestUtil.Test/packages.config =================================================================== diff -u --- Ringtoets/Piping/test/Ringtoets.Piping.IO.TestUtil.Test/packages.config (revision 0) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.TestUtil.Test/packages.config (revision fc2878b0779c6ae4c80720910ea9fbb1b3694420) @@ -0,0 +1,27 @@ + + + + + + \ No newline at end of file Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.TestUtil/Ringtoets.Piping.IO.TestUtil.csproj =================================================================== diff -u -r45440093089496f59ed420e772136756c229e30b -rfc2878b0779c6ae4c80720910ea9fbb1b3694420 --- Ringtoets/Piping/test/Ringtoets.Piping.IO.TestUtil/Ringtoets.Piping.IO.TestUtil.csproj (.../Ringtoets.Piping.IO.TestUtil.csproj) (revision 45440093089496f59ed420e772136756c229e30b) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.TestUtil/Ringtoets.Piping.IO.TestUtil.csproj (.../Ringtoets.Piping.IO.TestUtil.csproj) (revision fc2878b0779c6ae4c80720910ea9fbb1b3694420) @@ -43,12 +43,6 @@ - - - - - -