Index: Core/Common/src/Core.Common.Geometry/AdvancedMath2D.cs =================================================================== diff -u -r725bf2a9045d013dde7ff78d088bd433790ded88 -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Core/Common/src/Core.Common.Geometry/AdvancedMath2D.cs (.../AdvancedMath2D.cs) (revision 725bf2a9045d013dde7ff78d088bd433790ded88) +++ Core/Common/src/Core.Common.Geometry/AdvancedMath2D.cs (.../AdvancedMath2D.cs) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -27,7 +27,10 @@ namespace Core.Common.Geometry { - public class AdvancedMath2D + /// + /// This class contains more advanced mathematical routines for 2D geometries. + /// + public static class AdvancedMath2D { /// /// Calculates the intersection between two polygons, which can result in any number of polygons which represent the intersecting area. Polygons @@ -56,9 +59,11 @@ private static Polygon PointsToPolygon(IEnumerable points) { var pointList = points.ToList(); - if (!pointList.First().Equals(pointList.Last())) + var firstPoint = pointList.First(); + + if (!firstPoint.Equals(pointList.Last())) { - pointList.Add(pointList.First()); + pointList.Add(firstPoint); } var coordinates = pointList.Select(p => new Coordinate(p.X, p.Y)).ToArray(); Index: Core/Common/src/Core.Common.Geometry/Core.Common.Geometry.csproj =================================================================== diff -u -r725bf2a9045d013dde7ff78d088bd433790ded88 -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Core/Common/src/Core.Common.Geometry/Core.Common.Geometry.csproj (.../Core.Common.Geometry.csproj) (revision 725bf2a9045d013dde7ff78d088bd433790ded88) +++ Core/Common/src/Core.Common.Geometry/Core.Common.Geometry.csproj (.../Core.Common.Geometry.csproj) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -2,67 +2,24 @@ - 9.0.30729 - 2.0 {88665510-CE20-4EF5-BE4A-39800720AA2C} Library Properties Core.Common.Geometry Core.Common.Geometry v4.0 512 - OnBuildSuccess - false - - - - - 3.5 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - true DEBUG;TRACE - true - - full - false - prompt - AllRules.ruleset - - TRACE - true true - - - none - prompt - AllRules.ruleset - - TRACE - true true pdbonly prompt @@ -102,10 +59,12 @@ {3BBFD65B-B277-4E50-AE6D-BD24C3434609} Core.Common.Base + False {c90b77da-e421-43cc-b82e-529651bc21ac} Core.Common.Version + False Index: Core/Common/src/Core.Common.Geometry/InvalidPolygonException.cs =================================================================== diff -u -r725bf2a9045d013dde7ff78d088bd433790ded88 -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Core/Common/src/Core.Common.Geometry/InvalidPolygonException.cs (.../InvalidPolygonException.cs) (revision 725bf2a9045d013dde7ff78d088bd433790ded88) +++ Core/Common/src/Core.Common.Geometry/InvalidPolygonException.cs (.../InvalidPolygonException.cs) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -23,6 +23,9 @@ namespace Core.Common.Geometry { + /// + /// This exception can be used for when a polygon is not correctly defined. + /// public class InvalidPolygonException : Exception { /// Index: Core/Common/src/Core.Common.Geometry/packages.config =================================================================== diff -u -r725bf2a9045d013dde7ff78d088bd433790ded88 -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Core/Common/src/Core.Common.Geometry/packages.config (.../packages.config) (revision 725bf2a9045d013dde7ff78d088bd433790ded88) +++ Core/Common/src/Core.Common.Geometry/packages.config (.../packages.config) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -1,4 +1,27 @@  + + Index: Core/Common/test/Core.Common.Geometry.Test/AdvancedMath2DTest.cs =================================================================== diff -u -r725bf2a9045d013dde7ff78d088bd433790ded88 -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Core/Common/test/Core.Common.Geometry.Test/AdvancedMath2DTest.cs (.../AdvancedMath2DTest.cs) (revision 725bf2a9045d013dde7ff78d088bd433790ded88) +++ Core/Common/test/Core.Common.Geometry.Test/AdvancedMath2DTest.cs (.../AdvancedMath2DTest.cs) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -33,13 +33,7 @@ public void PolygonIntersectionWithPolygon_NoIntersection_ReturnsEmptyCollection() { // Setup - var polyA = new[] - { - new Point2D(0, 0), - new Point2D(0, 4), - new Point2D(4, 4), - new Point2D(4, 0) - }; + var polyA = CreateBasePolygon(); var polyB = new[] { @@ -60,25 +54,19 @@ public void PolygonIntersectionWithPolygon_WithSelfIntersectingPolygon_ThrowsInvalidPolygonException() { // Setup - var polyA = new[] - { - new Point2D(0, 0), - new Point2D(0, 4), - new Point2D(2, 0), - new Point2D(4, 4), - new Point2D(4, 0) - }; + var polyA = CreateBasePolygon(); var polyB = new[] { - new Point2D(5, 0), - new Point2D(5, 4), - new Point2D(9, 4), - new Point2D(9, 0) + new Point2D(4, 0), + new Point2D(4, 4), + new Point2D(6, 0), + new Point2D(8, 4), + new Point2D(8, 0) }; // Call - TestDelegate test = () => AdvancedMath2D.PolygonIntersectionWithPolygon(polyA, polyB); + TestDelegate test = () => AdvancedMath2D.PolygonIntersectionWithPolygon(polyB, polyA); // Assert Assert.Throws(test); @@ -88,13 +76,7 @@ public void PolygonIntersectionWithPolygon_IntersectsComplete_ReturnsIntersectionEqualToPolygon() { // Setup - var polyA = new[] - { - new Point2D(0, 0), - new Point2D(0, 4), - new Point2D(4, 4), - new Point2D(4, 0) - }; + var polyA = CreateBasePolygon(); var polyB = new[] { @@ -116,13 +98,7 @@ public void PolygonIntersectionWithPolygon_PartlyIntersects_ReturnsPartialIntersection() { // Setup - var polyA = new[] - { - new Point2D(0, 0), - new Point2D(0, 4), - new Point2D(4, 4), - new Point2D(4, 0) - }; + var polyA = CreateBasePolygon(); var polyB = new[] { @@ -144,13 +120,7 @@ public void PolygonIntersectionWithPolygon_TouchesOnSide_ReturnsEmptyCollection() { // Setup - var polyA = new[] - { - new Point2D(0, 0), - new Point2D(0, 4), - new Point2D(4, 4), - new Point2D(4, 0) - }; + var polyA = CreateBasePolygon(); var polyB = new[] { @@ -171,13 +141,7 @@ public void PolygonIntersectionWithPolygon_TouchesWithPointOnSide_ReturnsEmptyCollection() { // Setup - var polyA = new[] - { - new Point2D(0, 0), - new Point2D(0, 4), - new Point2D(4, 4), - new Point2D(4, 0) - }; + var polyA = CreateBasePolygon(); var polyB = new[] { @@ -199,13 +163,7 @@ public void PolygonIntersectionWithPolygon_PartiallyIntersectsTwice_ReturnsTwoIntersections() { // Setup - var polyA = new[] - { - new Point2D(0, 0), - new Point2D(0, 4), - new Point2D(4, 4), - new Point2D(4, 0) - }; + var polyA = CreateBasePolygon(); var polyB = new[] { @@ -239,5 +197,16 @@ new Point2D(2,1) }, intersections.ElementAt(1)); } + + private static Point2D[] CreateBasePolygon() + { + return new[] + { + new Point2D(0, 0), + new Point2D(0, 4), + new Point2D(4, 4), + new Point2D(4, 0) + }; + } } } \ No newline at end of file Index: Core/Common/test/Core.Common.Geometry.Test/Core.Common.Geometry.Test.csproj =================================================================== diff -u -r725bf2a9045d013dde7ff78d088bd433790ded88 -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Core/Common/test/Core.Common.Geometry.Test/Core.Common.Geometry.Test.csproj (.../Core.Common.Geometry.Test.csproj) (revision 725bf2a9045d013dde7ff78d088bd433790ded88) +++ Core/Common/test/Core.Common.Geometry.Test/Core.Common.Geometry.Test.csproj (.../Core.Common.Geometry.Test.csproj) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -4,63 +4,40 @@ Debug x86 - 9.0.30729 - 2.0 {E23513DE-B7D0-4415-BCDF-5A33CD084388} Library Properties Core.Common.Geometry.Test Core.Common.Geometry.Test v4.0 512 - - - 3.5 - - false - false - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - true true bin\Debug\ - 4 + DEBUG;TRACE + full x86 + prompt MinimumRecommendedRules.ruleset - TRACE;DEBUG - full - none bin\Release\ - 4 - x86 - MinimumRecommendedRules.ruleset TRACE true + none + x86 + prompt + MinimumRecommendedRules.ruleset bin\ReleaseForCodeCoverage\ TRACE true + pdbonly x86 + prompt MinimumRecommendedRules.ruleset - pdbonly Index: Core/Common/test/Core.Common.Geometry.Test/Properties/AssemblyInfo.cs =================================================================== diff -u -r725bf2a9045d013dde7ff78d088bd433790ded88 -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Core/Common/test/Core.Common.Geometry.Test/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision 725bf2a9045d013dde7ff78d088bd433790ded88) +++ Core/Common/test/Core.Common.Geometry.Test/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -18,40 +18,19 @@ // 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.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Core.Common.Geometry.Test")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyProduct("Core.Common.Geometry.Test")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("df8ad118-f614-49c8-b17d-9c0a747b7b94")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: Guid("df8ad118-f614-49c8-b17d-9c0a747b7b94")] \ No newline at end of file Index: Core/Components/src/Core.Components.Charting/Data/ChartMultipleAreaData.cs =================================================================== diff -u -rd494567cc0771ff224e920de98682a901dcfe01a -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Core/Components/src/Core.Components.Charting/Data/ChartMultipleAreaData.cs (.../ChartMultipleAreaData.cs) (revision d494567cc0771ff224e920de98682a901dcfe01a) +++ Core/Components/src/Core.Components.Charting/Data/ChartMultipleAreaData.cs (.../ChartMultipleAreaData.cs) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -27,8 +27,20 @@ namespace Core.Components.Charting.Data { + /// + /// This class represents data in 2D space which forms multiple closed areas. + /// public class ChartMultipleAreaData : ChartData { + /// + /// Creates a new instance of . + /// + /// A of of as (X,Y) points. + /// The name of the . + /// Thrown when is + /// null. + /// Thrown when is + /// null or only whitespace. public ChartMultipleAreaData(IEnumerable> areas, string name) : base(name) { Index: Core/Components/src/Core.Components.OxyPlot/CustomSeries/MultipleAreaSeries.cs =================================================================== diff -u -rd494567cc0771ff224e920de98682a901dcfe01a -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Core/Components/src/Core.Components.OxyPlot/CustomSeries/MultipleAreaSeries.cs (.../MultipleAreaSeries.cs) (revision d494567cc0771ff224e920de98682a901dcfe01a) +++ Core/Components/src/Core.Components.OxyPlot/CustomSeries/MultipleAreaSeries.cs (.../MultipleAreaSeries.cs) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -26,12 +26,18 @@ namespace Core.Components.OxyPlot.CustomSeries { + /// + /// Represents mutliple area series that fills the polygons defined by each collection of points. + /// public class MultipleAreaSeries : XYAxisSeries { private readonly OxyColor defaultColor = OxyColors.Fuchsia; public List Areas { get; private set; } + /// + /// Creates a instance of . + /// public MultipleAreaSeries() { Areas = new List(); Index: Core/Components/test/Core.Components.OxyPlot.Forms.Test/Core.Components.OxyPlot.Forms.Test.csproj =================================================================== diff -u -r0b76c9841bdeef5c3b9fa1ba0d6cb98a63b90c21 -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Core/Components/test/Core.Components.OxyPlot.Forms.Test/Core.Components.OxyPlot.Forms.Test.csproj (.../Core.Components.OxyPlot.Forms.Test.csproj) (revision 0b76c9841bdeef5c3b9fa1ba0d6cb98a63b90c21) +++ Core/Components/test/Core.Components.OxyPlot.Forms.Test/Core.Components.OxyPlot.Forms.Test.csproj (.../Core.Components.OxyPlot.Forms.Test.csproj) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -94,6 +94,10 @@ {dadaa0a5-288c-49cb-9f08-337f16832c86} Core.Components.OxyPlot.Forms + + {2344A7BD-7E25-4A1A-982E-6C674AF5167A} + Core.Components.OxyPlot + {E900A014-CA87-4374-87F0-813D653A9698} Core.Components.Charting.TestUtil Index: Core/Components/test/Core.Components.OxyPlot.Forms.Test/LinearPlotViewTest.cs =================================================================== diff -u -r0f2c3010ba8a0760af2c98f70abd6542a936ca32 -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Core/Components/test/Core.Components.OxyPlot.Forms.Test/LinearPlotViewTest.cs (.../LinearPlotViewTest.cs) (revision 0f2c3010ba8a0760af2c98f70abd6542a936ca32) +++ Core/Components/test/Core.Components.OxyPlot.Forms.Test/LinearPlotViewTest.cs (.../LinearPlotViewTest.cs) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -21,6 +21,7 @@ using System.Linq; using System.Windows.Forms; +using Core.Components.OxyPlot.CustomSeries; using NUnit.Framework; using OxyPlot; using OxyPlot.Axes; @@ -142,5 +143,66 @@ Assert.AreEqual(view.LeftAxisTitle, newTitle); Assert.AreEqual(1, invalidated); } + + [Test] + public void GivenMultipleAreaSeriesAddedToView_WhenViewOpenedAndUpdated_ThenXYAxisIncludesSeriesValues() + { + // Given + var form = new Form(); + var view = new LinearPlotView(); + form.Controls.Add(view); + var maxY = 100; + var minY = -25; + var maxX = 50; + var minX = -10; + var series = new MultipleAreaSeries + { + Areas = + { + new [] + { + new DataPoint(minX,maxY) + }, + new [] + { + new DataPoint(maxX,minY) + } + } + }; + + view.Model.Series.Add(series); + + // When + form.Show(); + view.Update(); + + // Then + Assert.AreEqual(maxX, series.XAxis.DataMaximum); + Assert.AreEqual(minX, series.XAxis.DataMinimum); + Assert.AreEqual(maxY, series.YAxis.DataMaximum); + Assert.AreEqual(minY, series.YAxis.DataMinimum); + } + + [Test] + public void GivenEmptyMultipleAreaSeriesAddedToView_WhenViewOpenedAndUpdated_ThenXYAxisNotChanged() + { + // Given + var form = new Form(); + var view = new LinearPlotView(); + form.Controls.Add(view); + var series = new MultipleAreaSeries(); + + view.Model.Series.Add(series); + + // When + form.Show(); + view.Update(); + + // Then + Assert.AreEqual(double.NaN, series.XAxis.DataMaximum); + Assert.AreEqual(double.NaN, series.XAxis.DataMinimum); + Assert.AreEqual(double.NaN, series.YAxis.DataMaximum); + Assert.AreEqual(double.NaN, series.YAxis.DataMinimum); + } } } \ No newline at end of file Index: Core/Components/test/Core.Components.OxyPlot.Test/CustomSeries/MultipleAreaSeriesTest.cs =================================================================== diff -u -r8293556a04e3650c9978df7a50f8f8ad0d792ed8 -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Core/Components/test/Core.Components.OxyPlot.Test/CustomSeries/MultipleAreaSeriesTest.cs (.../MultipleAreaSeriesTest.cs) (revision 8293556a04e3650c9978df7a50f8f8ad0d792ed8) +++ Core/Components/test/Core.Components.OxyPlot.Test/CustomSeries/MultipleAreaSeriesTest.cs (.../MultipleAreaSeriesTest.cs) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -23,6 +23,7 @@ using Core.Components.OxyPlot.CustomSeries; using NUnit.Framework; using OxyPlot; +using OxyPlot.Axes; using Rhino.Mocks; namespace Core.Components.OxyPlot.Test.CustomSeries @@ -168,6 +169,6 @@ // Assert mocks.VerifyAll(); - } + } } } \ No newline at end of file Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartAreaDataTreeNodeInfoTest.cs =================================================================== diff -u -rd494567cc0771ff224e920de98682a901dcfe01a -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartAreaDataTreeNodeInfoTest.cs (.../ChartAreaDataTreeNodeInfoTest.cs) (revision d494567cc0771ff224e920de98682a901dcfe01a) +++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartAreaDataTreeNodeInfoTest.cs (.../ChartAreaDataTreeNodeInfoTest.cs) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -10,7 +10,6 @@ using Core.Plugins.OxyPlot.Legend; using Core.Plugins.OxyPlot.Properties; using NUnit.Framework; -using Rhino.Mocks; namespace Core.Plugins.OxyPlot.Test.Legend { Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartDataCollectionTreeNodeInfoTest.cs =================================================================== diff -u -rd494567cc0771ff224e920de98682a901dcfe01a -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartDataCollectionTreeNodeInfoTest.cs (.../ChartDataCollectionTreeNodeInfoTest.cs) (revision d494567cc0771ff224e920de98682a901dcfe01a) +++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartDataCollectionTreeNodeInfoTest.cs (.../ChartDataCollectionTreeNodeInfoTest.cs) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -10,7 +10,6 @@ using Core.Components.Charting.TestUtil; using Core.Plugins.OxyPlot.Legend; using NUnit.Framework; -using Rhino.Mocks; using GuiResources = Core.Common.Gui.Properties.Resources; namespace Core.Plugins.OxyPlot.Test.Legend Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartLineDataTreeNodeInfoTest.cs =================================================================== diff -u -rd494567cc0771ff224e920de98682a901dcfe01a -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartLineDataTreeNodeInfoTest.cs (.../ChartLineDataTreeNodeInfoTest.cs) (revision d494567cc0771ff224e920de98682a901dcfe01a) +++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartLineDataTreeNodeInfoTest.cs (.../ChartLineDataTreeNodeInfoTest.cs) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -10,7 +10,6 @@ using Core.Plugins.OxyPlot.Legend; using Core.Plugins.OxyPlot.Properties; using NUnit.Framework; -using Rhino.Mocks; namespace Core.Plugins.OxyPlot.Test.Legend { Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartMultipleAreaDataTreeNodeInfoTest.cs =================================================================== diff -u -rd494567cc0771ff224e920de98682a901dcfe01a -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartMultipleAreaDataTreeNodeInfoTest.cs (.../ChartMultipleAreaDataTreeNodeInfoTest.cs) (revision d494567cc0771ff224e920de98682a901dcfe01a) +++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartMultipleAreaDataTreeNodeInfoTest.cs (.../ChartMultipleAreaDataTreeNodeInfoTest.cs) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -11,7 +11,6 @@ using Core.Plugins.OxyPlot.Legend; using Core.Plugins.OxyPlot.Properties; using NUnit.Framework; -using Rhino.Mocks; namespace Core.Plugins.OxyPlot.Test.Legend { Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartPointDataTreeNodeInfoTest.cs =================================================================== diff -u -rd494567cc0771ff224e920de98682a901dcfe01a -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartPointDataTreeNodeInfoTest.cs (.../ChartPointDataTreeNodeInfoTest.cs) (revision d494567cc0771ff224e920de98682a901dcfe01a) +++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartPointDataTreeNodeInfoTest.cs (.../ChartPointDataTreeNodeInfoTest.cs) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -10,7 +10,6 @@ using Core.Plugins.OxyPlot.Legend; using Core.Plugins.OxyPlot.Properties; using NUnit.Framework; -using Rhino.Mocks; namespace Core.Plugins.OxyPlot.Test.Legend { Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Ringtoets.Piping.Forms.csproj =================================================================== diff -u -rce94b8228bc7e51779b3754217580f13cb35e475 -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Ringtoets.Piping.Forms.csproj (.../Ringtoets.Piping.Forms.csproj) (revision ce94b8228bc7e51779b3754217580f13cb35e475) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Ringtoets.Piping.Forms.csproj (.../Ringtoets.Piping.Forms.csproj) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -138,6 +138,7 @@ {88665510-CE20-4EF5-BE4A-39800720AA2C} Core.Common.Geometry + False {30e4c2ae-719e-4d70-9fa9-668a9767fbfa} Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingChartDataFactoryTest.cs =================================================================== diff -u -rd494567cc0771ff224e920de98682a901dcfe01a -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingChartDataFactoryTest.cs (.../PipingChartDataFactoryTest.cs) (revision d494567cc0771ff224e920de98682a901dcfe01a) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingChartDataFactoryTest.cs (.../PipingChartDataFactoryTest.cs) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -499,6 +499,35 @@ } [Test] + public void CreatePipingSoilLayer_SurfaceLineNull_ThrowsArgumentNullException() + { + var profile = new PipingSoilProfile("name", 2.0, new[] + { + new PipingSoilLayer(3.2) + }, SoilProfileType.SoilProfile1D, 0); + + // Call + TestDelegate test = () => PipingChartDataFactory.CreatePipingSoilLayer(0, profile, null); + + // Assert + var paramName = Assert.Throws(test).ParamName; + Assert.AreEqual("surfaceLine", paramName); + } + + [Test] + public void CreatePipingSoilLayer_SoilProfileNull_ThrowsArgumentException() + { + var surfaceLine = new RingtoetsPipingSurfaceLine(); + + // Call + TestDelegate test = () => PipingChartDataFactory.CreatePipingSoilLayer(0, null, surfaceLine); + + // Assert + var paramName = Assert.Throws(test).ParamName; + Assert.AreEqual("soilProfile", paramName); + } + + [Test] public void CreatePipingSoilLayer_SurfaceLineOnOrAboveSoilLayer_SoilLayerAsRectangleReturned() { var surfaceLine = new RingtoetsPipingSurfaceLine(); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingInputViewTest.cs =================================================================== diff -u -raa62ab2cf343653fd00dec134a60c36ed43371fc -r9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingInputViewTest.cs (.../PipingInputViewTest.cs) (revision aa62ab2cf343653fd00dec134a60c36ed43371fc) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingInputViewTest.cs (.../PipingInputViewTest.cs) (revision 9b2c164b84e6bbdfdced4f8a1a1a9e023f078fc1) @@ -22,7 +22,6 @@ using System.Collections.Generic; using System.Linq; using System.Windows.Forms; -using Core.Common.Base; using Core.Common.Base.Geometry; using Core.Components.Charting.Data; using Core.Components.Charting.Forms; @@ -31,7 +30,6 @@ using Ringtoets.Piping.Data; using Ringtoets.Piping.Forms.Properties; using Ringtoets.Piping.Forms.Views; -using Ringtoets.Piping.KernelWrapper.TestUtil; using Ringtoets.Piping.Primitives; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources;