Beispiel #1
0
        public void CloseForData_NestedViewNotCorrespondingToRemovedAssessmentSection_ReturnsFalse()
        {
            // Setup
            var calculation      = new ProbabilisticPipingCalculationScenario();
            var calculationGroup = new CalculationGroup();

            calculationGroup.Children.Add(calculation);

            var failureMechanism = new PipingFailureMechanism();

            failureMechanism.CalculationsGroup.Children.Add(calculationGroup);

            var assessmentSection = mocks.Stub <IAssessmentSection>();

            assessmentSection.Stub(section => section.GetFailureMechanisms()).Return(new[]
            {
                failureMechanism
            });

            mocks.ReplayAll();

            using (var view = new PipingInputView
            {
                Data = new ProbabilisticPipingCalculationScenario()
            })
            {
                // Call
                bool closeForData = info.CloseForData(view, assessmentSection);

                // Assert
                Assert.IsFalse(closeForData);
                mocks.VerifyAll();
            }
        }
Beispiel #2
0
        public void CloseForData_NestedViewCorrespondingToRemovedFailureMechanismContext_ReturnsTrue()
        {
            // Setup
            var assessmentSection = mocks.Stub <IAssessmentSection>();

            mocks.ReplayAll();

            var calculation      = new ProbabilisticPipingCalculationScenario();
            var calculationGroup = new CalculationGroup();

            calculationGroup.Children.Add(calculation);

            var failureMechanism = new PipingFailureMechanism();

            failureMechanism.CalculationsGroup.Children.Add(calculationGroup);

            var context = new PipingFailureMechanismContext(failureMechanism, assessmentSection);

            using (var view = new PipingInputView
            {
                Data = calculation
            })
            {
                // Call
                bool closeForData = info.CloseForData(view, context);

                // Assert
                Assert.IsTrue(closeForData);
                mocks.VerifyAll();
            }
        }
        public void UpdateObserver_PreviousCalculationUpdated_ChartTitleNotUpdated()
        {
            // Setup
            using (var view = new PipingInputView())
            {
                const string initialName = "Initial name";
                const string updatedName = "Updated name";

                var calculation = new TestPipingCalculationScenario(new TestPipingInput())
                {
                    Name = initialName
                };

                view.Data = calculation;

                // Precondition
                Assert.AreEqual(initialName, view.Chart.ChartTitle);

                view.Data = new TestPipingCalculationScenario(new TestPipingInput())
                {
                    Name = initialName
                };

                calculation.Name = updatedName;

                // Call
                calculation.NotifyObservers();

                // Assert
                Assert.AreEqual(initialName, view.Chart.ChartTitle);
            }
        }
Beispiel #4
0
        public void CloseForData_ViewNotCorrespondingToRemovedPipingCalculationScenarioContext_ReturnsFalse()
        {
            // Setup
            var assessmentSection = mocks.Stub <IAssessmentSection>();

            mocks.ReplayAll();

            var pipingCalculation   = new ProbabilisticPipingCalculationScenario();
            var calculationToRemove = new ProbabilisticPipingCalculationScenario();

            var pipingCalculationScenarioContext = new ProbabilisticPipingCalculationScenarioContext(calculationToRemove,
                                                                                                     new CalculationGroup(),
                                                                                                     Enumerable.Empty <PipingSurfaceLine>(),
                                                                                                     Enumerable.Empty <PipingStochasticSoilModel>(),
                                                                                                     new PipingFailureMechanism(),
                                                                                                     assessmentSection);

            using (var view = new PipingInputView
            {
                Data = pipingCalculation
            })
            {
                // Call
                bool closeForData = info.CloseForData(view, pipingCalculationScenarioContext);

                // Assert
                Assert.IsFalse(closeForData);
                mocks.VerifyAll();
            }
        }
        public void GivenPipingInputViewWithSoilProfileSeries_WhenSurfaceLineSetToNull_ThenCollectionOfEmptyChartDataSetForSoilProfiles()
        {
            // Given
            using (var view = new PipingInputView())
            {
                PipingSurfaceLine           surfaceLine           = GetSurfaceLineWithGeometry();
                PipingStochasticSoilProfile stochasticSoilProfile = GetStochasticSoilProfile();
                var calculation = new TestPipingCalculationScenario(new TestPipingInput())
                {
                    InputParameters =
                    {
                        SurfaceLine           = surfaceLine,
                        StochasticSoilProfile = stochasticSoilProfile
                    }
                };

                view.Data = calculation;

                ChartDataCollection chartData = view.Chart.Data;

                // Precondition
                Assert.IsNotNull(chartData);
                Assert.AreEqual(10, chartData.Collection.Count());
                AssertSoilProfileChartData(stochasticSoilProfile, chartData.Collection.ElementAt(soilProfileIndex), true);

                // When
                calculation.InputParameters.SurfaceLine = null;
                calculation.InputParameters.NotifyObservers();

                // Then
                AssertSoilProfileChartData(stochasticSoilProfile, chartData.Collection.ElementAt(soilProfileIndex), false);
            }
        }
Beispiel #6
0
        public void CloseForData_NestedViewNotCorrespondingWithRemovedParentPipingCalculationGroupContext_ReturnsFalse()
        {
            // Setup
            var assessmentSection = mocks.Stub <IAssessmentSection>();

            mocks.ReplayAll();

            var calculation = new ProbabilisticPipingCalculationScenario();
            var nestedGroup = new CalculationGroup();

            nestedGroup.Children.Add(calculation);
            var calculationGroup = new CalculationGroup();

            calculationGroup.Children.Add(nestedGroup);

            var calculationGroupContext = new PipingCalculationGroupContext(new CalculationGroup(),
                                                                            null,
                                                                            Enumerable.Empty <PipingSurfaceLine>(),
                                                                            Enumerable.Empty <PipingStochasticSoilModel>(),
                                                                            new PipingFailureMechanism(),
                                                                            assessmentSection);

            using (var view = new PipingInputView
            {
                Data = calculation
            })
            {
                // Call
                bool closeForData = info.CloseForData(view, calculationGroupContext);

                // Assert
                Assert.IsFalse(closeForData);
                mocks.VerifyAll();
            }
        }
        public void Data_WithSurfaceLineWithoutStochasticSoilProfile_CollectionOfEmptyChartDataSetForSoilProfile()
        {
            // Setup
            using (var view = new PipingInputView())
            {
                PipingSurfaceLine surfaceLine = GetSurfaceLineWithGeometry();
                var calculation = new TestPipingCalculationScenario(new TestPipingInput())
                {
                    InputParameters =
                    {
                        SurfaceLine = surfaceLine
                    }
                };

                // Call
                view.Data = calculation;

                // Assert
                Assert.AreSame(calculation, view.Data);
                ChartDataCollection chartData = view.Chart.Data;
                Assert.IsInstanceOf <ChartDataCollection>(chartData);
                Assert.AreEqual(10, chartData.Collection.Count());
                var soilProfileData = (ChartDataCollection)chartData.Collection.ElementAt(soilProfileIndex);
                CollectionAssert.IsEmpty(soilProfileData.Collection);
                Assert.AreEqual("Ondergrondschematisatie", soilProfileData.Name);
            }
        }
        public void Data_SetToNull_TableDataCleared()
        {
            // Setup
            var calculation = new TestPipingCalculationScenario(new TestPipingInput())
            {
                InputParameters =
                {
                    StochasticSoilProfile = GetStochasticSoilProfile()
                }
            };

            using (var view = new PipingInputView
            {
                Data = calculation
            })
            {
                var tableControl = view.Controls.Find("pipingSoilLayerTable", true).First() as PipingSoilLayerTable;

                // Precondition
                Assert.NotNull(tableControl);
                Assert.AreEqual(3, tableControl.Rows.Count);

                // Call
                view.Data = null;

                // Assert
                Assert.IsNull(view.Data);
                CollectionAssert.IsEmpty(tableControl.Rows);
            }
        }
        private static void AssertEmptySoilLayerTable(PipingInputView view)
        {
            var tableControl = view.Controls.Find("pipingSoilLayerTable", true).First() as PipingSoilLayerTable;

            // Precondition
            Assert.NotNull(tableControl);
            CollectionAssert.IsEmpty(tableControl.Rows);
        }
Beispiel #10
0
        public void UpdateObserver_StochasticSoilProfileUpdated_ChartDataUpdated()
        {
            // Setup
            var mocks    = new MockRepository();
            var observer = mocks.StrictMock <IObserver>();

            observer.Expect(o => o.UpdateObserver());
            mocks.ReplayAll();

            using (var view = new PipingInputView())
            {
                PipingSurfaceLine           surfaceLine = GetSurfaceLineWithGeometry();
                PipingStochasticSoilProfile soilProfile = GetStochasticSoilProfile();
                var soilProfile2 = new PipingStochasticSoilProfile(
                    0.5, new PipingSoilProfile("profile 2", -2, new[]
                {
                    new PipingSoilLayer(0)
                    {
                        MaterialName = "Grass"
                    },
                    new PipingSoilLayer(2)
                    {
                        MaterialName = "Stone"
                    },
                    new PipingSoilLayer(3)
                    {
                        MaterialName = "Peat"
                    }
                }, SoilProfileType.SoilProfile1D));

                var calculation = new TestPipingCalculationScenario(new TestPipingInput())
                {
                    InputParameters =
                    {
                        SurfaceLine           = surfaceLine,
                        StochasticSoilProfile = soilProfile
                    }
                };

                view.Data = calculation;

                var soilProfileData = (ChartDataCollection)view.Chart.Data.Collection.ElementAt(soilProfileIndex);
                soilProfileData.Attach(observer);

                calculation.InputParameters.StochasticSoilProfile = soilProfile2;

                // Call
                calculation.InputParameters.NotifyObservers();

                // Assert
                Assert.AreSame(soilProfileData, (ChartDataCollection)view.Chart.Data.Collection.ElementAt(soilProfileIndex));
                AssertSoilProfileChartData(soilProfile2, soilProfileData, true);
                mocks.VerifyAll();
            }
        }
Beispiel #11
0
 public void DefaultConstructor_Always_AddEmptyTableControl()
 {
     // Call
     using (var view = new PipingInputView())
     {
         // Assert
         var tableControl = (PipingSoilLayerTable)view.Controls.Find("pipingSoilLayerTable", true).First();
         Assert.NotNull(tableControl);
         Assert.AreEqual(DockStyle.Bottom, tableControl.Dock);
         CollectionAssert.IsEmpty(tableControl.Rows);
     }
 }
Beispiel #12
0
 public void DefaultConstructor_DefaultValues()
 {
     // Call
     using (var view = new PipingInputView())
     {
         // Assert
         Assert.IsInstanceOf <UserControl>(view);
         Assert.IsInstanceOf <IChartView>(view);
         Assert.IsNotNull(view.Chart);
         Assert.IsNull(view.Data);
         Assert.AreEqual(2, view.Controls.Count);
     }
 }
Beispiel #13
0
        public void Data_WithoutStochasticSoilProfile_SoilLayerTableEmpty()
        {
            // Setup
            using (var view = new PipingInputView())
            {
                var calculation = new TestPipingCalculationScenario(new TestPipingInput());

                // Call
                view.Data = calculation;

                // Assert
                AssertEmptySoilLayerTable(view);
            }
        }
Beispiel #14
0
        public void Data_WithoutSurfaceLine_NoChartDataSet()
        {
            // Setup
            using (var view = new PipingInputView())
            {
                var calculation = new TestPipingCalculationScenario(new TestPipingInput());

                // Call
                view.Data = calculation;

                // Assert
                AssertEmptyChartData(view.Chart.Data);
            }
        }
Beispiel #15
0
        public void Data_PipingCalculationScenario_DataSet()
        {
            // Setup
            using (var view = new PipingInputView())
            {
                var calculation = new TestPipingCalculationScenario(new TestPipingInput());

                // Call
                view.Data = calculation;

                // Assert
                Assert.AreSame(calculation, view.Data);
            }
        }
Beispiel #16
0
 public void DefaultConstructor_Always_AddEmptyChartControl()
 {
     // Call
     using (var view = new PipingInputView())
     {
         // Assert
         var chartControl = (IChartControl)view.Controls.Find("chartControl", true).First();
         Assert.IsInstanceOf <Control>(chartControl);
         Assert.AreEqual(DockStyle.Fill, ((Control)chartControl).Dock);
         Assert.AreEqual("Afstand [m]", chartControl.BottomAxisTitle);
         Assert.AreEqual("Hoogte [m+NAP]", chartControl.LeftAxisTitle);
         Assert.IsNull(chartControl.Data);
     }
 }
Beispiel #17
0
        public void Data_OtherThanPipingCalculationScenario_DataNull()
        {
            // Setup
            using (var view = new PipingInputView())
            {
                var data = new object();

                // Call
                view.Data = data;

                // Assert
                Assert.IsNull(view.Data);
            }
        }
Beispiel #18
0
        public void Data_SetToNull_ChartDataCleared()
        {
            // Setup
            using (var view = new PipingInputView
            {
                Data = new TestPipingCalculationScenario(new TestPipingInput())
            })
            {
                // Precondition
                Assert.AreEqual(10, view.Chart.Data.Collection.Count());
                Assert.AreEqual("Nieuwe berekening", view.Chart.ChartTitle);

                // Call
                view.Data = null;

                // Assert
                Assert.IsNull(view.Data);
                Assert.IsNull(view.Chart.Data);
                Assert.IsEmpty(view.Chart.ChartTitle);
            }
        }
Beispiel #19
0
        public void Data_WithSurfaceLineAndSoilProfile_DataUpdatedToCollectionOfFilledChartData()
        {
            // Setup
            using (var view = new PipingInputView())
            {
                PipingSurfaceLine surfaceLine = GetSurfaceLineWithGeometry();
                surfaceLine.SetDitchDikeSideAt(new Point3D(1.2, 2.3, 4.0));
                surfaceLine.SetBottomDitchDikeSideAt(new Point3D(1.2, 2.3, 4.0));
                surfaceLine.SetDitchPolderSideAt(new Point3D(1.2, 2.3, 4.0));
                surfaceLine.SetBottomDitchPolderSideAt(new Point3D(1.2, 2.3, 4.0));
                surfaceLine.SetDikeToeAtPolderAt(new Point3D(1.2, 2.3, 4.0));
                surfaceLine.SetDikeToeAtRiverAt(new Point3D(1.2, 2.3, 4.0));

                PipingStochasticSoilProfile stochasticSoilProfile = GetStochasticSoilProfile();
                var calculation = new TestPipingCalculationScenario(new TestPipingInput())
                {
                    InputParameters =
                    {
                        SurfaceLine           = surfaceLine,
                        StochasticSoilProfile = stochasticSoilProfile
                    }
                };

                // Call
                view.Data = calculation;

                // Assert
                Assert.AreSame(calculation, view.Data);
                ChartDataCollection chartData = view.Chart.Data;
                Assert.IsInstanceOf <ChartDataCollection>(chartData);
                Assert.AreEqual(10, chartData.Collection.Count());
                AssertSoilProfileChartData(stochasticSoilProfile, chartData.Collection.ElementAt(soilProfileIndex), true);
                AssertSurfaceLineChartData(surfaceLine, chartData.Collection.ElementAt(surfaceLineIndex));
                AssertEntryPointLPointchartData(calculation.InputParameters, surfaceLine, chartData.Collection.ElementAt(entryPointIndex));
                AssertExitPointLPointchartData(calculation.InputParameters, surfaceLine, chartData.Collection.ElementAt(exitPointIndex));
                AssertCharacteristicPoints(surfaceLine, chartData.Collection.ToList());
            }
        }
Beispiel #20
0
        public void UpdateObserver_PreviousCalculationUpdated_ChartDataNotUpdated()
        {
            // Setup
            var mocks    = new MockRepository();
            var observer = mocks.StrictMock <IObserver>();

            mocks.ReplayAll();

            using (var view = new PipingInputView())
            {
                var calculation = new TestPipingCalculationScenario(new TestPipingInput())
                {
                    InputParameters =
                    {
                        SurfaceLine = GetSurfaceLineWithGeometry()
                    }
                };

                view.Data = calculation;

                ChartDataCollection dataBeforeUpdate = view.Chart.Data;
                foreach (ChartData chartData in dataBeforeUpdate.Collection)
                {
                    chartData.Attach(observer);
                }

                view.Data = new TestPipingCalculationScenario(new TestPipingInput());

                calculation.InputParameters.SurfaceLine = GetSecondSurfaceLineWithGeometry();

                // Call
                calculation.InputParameters.NotifyObservers();

                // Assert
                Assert.AreEqual(dataBeforeUpdate, view.Chart.Data);
                mocks.VerifyAll(); // No update observer expected
            }
        }
Beispiel #21
0
        public void UpdateObserver_CalculationSurfaceLineUpdated_ChartDataUpdated()
        {
            // Setup
            var mocks    = new MockRepository();
            var observer = mocks.StrictMock <IObserver>();

            observer.Expect(o => o.UpdateObserver()).Repeat.Times(9);
            mocks.ReplayAll();

            using (var view = new PipingInputView())
            {
                var characteristicPoint       = new Point3D(1.2, 2.3, 4.0);
                PipingSurfaceLine surfaceLine = GetSurfaceLineWithGeometry();

                surfaceLine.SetDitchDikeSideAt(characteristicPoint);
                surfaceLine.SetBottomDitchDikeSideAt(characteristicPoint);
                surfaceLine.SetDitchPolderSideAt(characteristicPoint);
                surfaceLine.SetBottomDitchPolderSideAt(characteristicPoint);
                surfaceLine.SetDikeToeAtPolderAt(characteristicPoint);
                surfaceLine.SetDikeToeAtRiverAt(characteristicPoint);

                var calculation = new TestPipingCalculationScenario(new TestPipingInput())
                {
                    InputParameters =
                    {
                        SurfaceLine = surfaceLine
                    }
                };

                view.Data = calculation;

                List <ChartData> chartDataList = view.Chart.Data.Collection.ToList();
                var surfaceLineChartData       = (ChartLineData)chartDataList[surfaceLineIndex];
                var entryPointChartData        = (ChartPointData)chartDataList[entryPointIndex];
                var exitPointChartData         = (ChartPointData)chartDataList[exitPointIndex];
                var ditchDikeSideData          = (ChartPointData)chartDataList[ditchDikeSideIndex];
                var bottomDitchDikeSideData    = (ChartPointData)chartDataList[bottomDitchDikeSideIndex];
                var ditchPolderSideData        = (ChartPointData)chartDataList[ditchPolderSideIndex];
                var bottomDitchPolderSideData  = (ChartPointData)chartDataList[bottomDitchPolderSideIndex];
                var dikeToeAtPolderData        = (ChartPointData)chartDataList[dikeToeAtPolderIndex];
                var dikeToeAtRiverData         = (ChartPointData)chartDataList[dikeToeAtRiverIndex];

                surfaceLineChartData.Attach(observer);
                entryPointChartData.Attach(observer);
                exitPointChartData.Attach(observer);
                ditchDikeSideData.Attach(observer);
                bottomDitchDikeSideData.Attach(observer);
                ditchPolderSideData.Attach(observer);
                bottomDitchPolderSideData.Attach(observer);
                dikeToeAtPolderData.Attach(observer);
                dikeToeAtRiverData.Attach(observer);

                var characteristicPoint2       = new Point3D(3.5, 2.3, 8.0);
                PipingSurfaceLine surfaceLine2 = GetSecondSurfaceLineWithGeometry();

                surfaceLine2.SetDitchDikeSideAt(characteristicPoint2);
                surfaceLine2.SetBottomDitchDikeSideAt(characteristicPoint2);
                surfaceLine2.SetDitchPolderSideAt(characteristicPoint2);
                surfaceLine2.SetBottomDitchPolderSideAt(characteristicPoint2);
                surfaceLine2.SetDikeToeAtPolderAt(characteristicPoint2);
                surfaceLine2.SetDikeToeAtRiverAt(characteristicPoint2);

                calculation.InputParameters.SurfaceLine = surfaceLine2;

                // Call
                calculation.InputParameters.NotifyObservers();

                // Assert
                chartDataList = view.Chart.Data.Collection.ToList();

                Assert.AreSame(surfaceLineChartData, (ChartLineData)chartDataList[surfaceLineIndex]);
                Assert.AreSame(entryPointChartData, (ChartPointData)chartDataList[entryPointIndex]);
                Assert.AreSame(exitPointChartData, (ChartPointData)chartDataList[exitPointIndex]);
                Assert.AreSame(ditchDikeSideData, (ChartPointData)chartDataList[ditchDikeSideIndex]);
                Assert.AreSame(bottomDitchDikeSideData, (ChartPointData)chartDataList[bottomDitchDikeSideIndex]);
                Assert.AreSame(ditchPolderSideData, (ChartPointData)chartDataList[ditchPolderSideIndex]);
                Assert.AreSame(bottomDitchPolderSideData, (ChartPointData)chartDataList[bottomDitchPolderSideIndex]);
                Assert.AreSame(dikeToeAtPolderData, (ChartPointData)chartDataList[dikeToeAtPolderIndex]);
                Assert.AreSame(dikeToeAtRiverData, (ChartPointData)chartDataList[dikeToeAtRiverIndex]);

                AssertSurfaceLineChartData(surfaceLine2, surfaceLineChartData);
                AssertEntryPointLPointchartData(calculation.InputParameters, surfaceLine2, entryPointChartData);
                AssertExitPointLPointchartData(calculation.InputParameters, surfaceLine2, exitPointChartData);
                AssertCharacteristicPoints(surfaceLine2, chartDataList);
                mocks.VerifyAll();
            }
        }
Beispiel #22
0
        public void UpdateObserver_DataUpdated_ChartSeriesSameOrder()
        {
            // Setup
            const int updatedSoilProfileIndex           = soilProfileIndex;
            const int updatedSurfaceLineIndex           = surfaceLineIndex + 8;
            const int updatedDitchPolderSideIndex       = ditchPolderSideIndex - 1;
            const int updatedBottomDitchPolderSideIndex = bottomDitchPolderSideIndex - 1;
            const int updatedBottomDitchDikeSideIndex   = bottomDitchDikeSideIndex - 1;
            const int updatedDitchDikeSideIndex         = ditchDikeSideIndex - 1;
            const int updatedDikeToeAtPolderIndex       = dikeToeAtPolderIndex - 1;
            const int updatedDikeToeAtRiverIndex        = dikeToeAtRiverIndex - 1;
            const int updatedExitPointIndex             = exitPointIndex - 1;
            const int updatedEntryPointIndex            = entryPointIndex - 1;

            var calculation = new TestPipingCalculationScenario(new TestPipingInput());

            using (var view = new PipingInputView
            {
                Data = calculation
            })
            {
                ChartDataCollection chartData = view.Chart.Data;

                ChartData dataToMove = chartData.Collection.ElementAt(surfaceLineIndex);
                chartData.Remove(dataToMove);
                chartData.Add(dataToMove);

                List <ChartData> chartDataList = chartData.Collection.ToList();

                var soilProfileData           = (ChartDataCollection)chartDataList[updatedSoilProfileIndex];
                var surfaceLineData           = (ChartLineData)chartDataList[updatedSurfaceLineIndex];
                var entryPointData            = (ChartPointData)chartDataList[updatedEntryPointIndex];
                var exitPointData             = (ChartPointData)chartDataList[updatedExitPointIndex];
                var ditchDikeSideData         = (ChartPointData)chartDataList[updatedDitchDikeSideIndex];
                var bottomDitchDikeSideData   = (ChartPointData)chartDataList[updatedBottomDitchDikeSideIndex];
                var ditchPolderSideData       = (ChartPointData)chartDataList[updatedDitchPolderSideIndex];
                var bottomDitchPolderSideData = (ChartPointData)chartDataList[updatedBottomDitchPolderSideIndex];
                var dikeToeAtPolderData       = (ChartPointData)chartDataList[updatedDikeToeAtPolderIndex];
                var dikeToeAtRiverData        = (ChartPointData)chartDataList[updatedDikeToeAtRiverIndex];

                Assert.AreEqual("Ondergrondschematisatie", soilProfileData.Name);
                Assert.AreEqual("Profielschematisatie", surfaceLineData.Name);
                Assert.AreEqual("Intredepunt", entryPointData.Name);
                Assert.AreEqual("Uittredepunt", exitPointData.Name);
                Assert.AreEqual("Insteek sloot dijkzijde", ditchDikeSideData.Name);
                Assert.AreEqual("Slootbodem dijkzijde", bottomDitchDikeSideData.Name);
                Assert.AreEqual("Insteek sloot polderzijde", ditchPolderSideData.Name);
                Assert.AreEqual("Slootbodem polderzijde", bottomDitchPolderSideData.Name);
                Assert.AreEqual("Teen dijk binnenwaarts", dikeToeAtPolderData.Name);
                Assert.AreEqual("Teen dijk buitenwaarts", dikeToeAtRiverData.Name);

                PipingSurfaceLine surfaceLine = GetSurfaceLineWithGeometry();
                calculation.InputParameters.SurfaceLine = surfaceLine;

                // Call
                calculation.InputParameters.NotifyObservers();

                // Assert
                chartDataList = chartData.Collection.ToList();

                var actualSoilProfileData           = (ChartDataCollection)chartDataList[updatedSoilProfileIndex];
                var actualSurfaceLineData           = (ChartLineData)chartDataList[updatedSurfaceLineIndex];
                var actualEntryPointData            = (ChartPointData)chartDataList[updatedEntryPointIndex];
                var actualExitPointData             = (ChartPointData)chartDataList[updatedExitPointIndex];
                var actualDitchDikeSideData         = (ChartPointData)chartDataList[updatedDitchDikeSideIndex];
                var actualBottomDitchDikeSideData   = (ChartPointData)chartDataList[updatedBottomDitchDikeSideIndex];
                var actualDitchPolderSideData       = (ChartPointData)chartDataList[updatedDitchPolderSideIndex];
                var actualBottomDitchPolderSideData = (ChartPointData)chartDataList[updatedBottomDitchPolderSideIndex];
                var actualDikeToeAtPolderData       = (ChartPointData)chartDataList[updatedDikeToeAtPolderIndex];
                var actualDikeToeAtRiverData        = (ChartPointData)chartDataList[updatedDikeToeAtRiverIndex];

                Assert.AreEqual("Ondergrondschematisatie", actualSoilProfileData.Name);
                Assert.AreEqual(surfaceLine.Name, actualSurfaceLineData.Name);
                Assert.AreEqual("Intredepunt", actualEntryPointData.Name);
                Assert.AreEqual("Uittredepunt", actualExitPointData.Name);
                Assert.AreEqual("Insteek sloot dijkzijde", actualDitchDikeSideData.Name);
                Assert.AreEqual("Slootbodem dijkzijde", actualBottomDitchDikeSideData.Name);
                Assert.AreEqual("Insteek sloot polderzijde", actualDitchPolderSideData.Name);
                Assert.AreEqual("Slootbodem polderzijde", actualBottomDitchPolderSideData.Name);
                Assert.AreEqual("Teen dijk binnenwaarts", actualDikeToeAtPolderData.Name);
                Assert.AreEqual("Teen dijk buitenwaarts", actualDikeToeAtRiverData.Name);
            }
        }