Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/Views/HydraulicBoundaryCalculationsViewTest.cs =================================================================== diff -u -r8638c218b3213811c20579ba8f14a377c5932002 -r818cad8d6d3258cbc9fc0606b9ceb6e89b038e77 --- Riskeer/Common/test/Riskeer.Common.Forms.Test/Views/HydraulicBoundaryCalculationsViewTest.cs (.../HydraulicBoundaryCalculationsViewTest.cs) (revision 8638c218b3213811c20579ba8f14a377c5932002) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/Views/HydraulicBoundaryCalculationsViewTest.cs (.../HydraulicBoundaryCalculationsViewTest.cs) (revision 818cad8d6d3258cbc9fc0606b9ceb6e89b038e77) @@ -58,43 +58,7 @@ { testForm.Dispose(); } - - [Test] - public void HydraulicBoundaryCalculationsView_AssessmentSectionWithData_DataGridViewCorrectlyInitialized() - { - // Setup & Call - ShowFullyConfiguredTestHydraulicBoundaryCalculationsView(); - // Assert - DataGridView dataGridView = ControlTestHelper.GetDataGridView(testForm, "dataGridView"); - DataGridViewRowCollection rows = dataGridView.Rows; - Assert.AreEqual(3, rows.Count); - - DataGridViewCellCollection cells = rows[0].Cells; - Assert.AreEqual(5, cells.Count); - Assert.AreEqual(false, cells[calculateColumnIndex].FormattedValue); - Assert.AreEqual(false, cells[includeIllustrationPointsColumnIndex].FormattedValue); - Assert.AreEqual("1", cells[locationNameColumnIndex].FormattedValue); - Assert.AreEqual("1", cells[locationIdColumnIndex].FormattedValue); - Assert.AreEqual(new Point2D(1, 1).ToString(), cells[locationColumnIndex].FormattedValue); - - cells = rows[1].Cells; - Assert.AreEqual(5, cells.Count); - Assert.AreEqual(false, cells[calculateColumnIndex].FormattedValue); - Assert.AreEqual(false, cells[includeIllustrationPointsColumnIndex].FormattedValue); - Assert.AreEqual("2", cells[locationNameColumnIndex].FormattedValue); - Assert.AreEqual("2", cells[locationIdColumnIndex].FormattedValue); - Assert.AreEqual(new Point2D(2, 2).ToString(), cells[locationColumnIndex].FormattedValue); - - cells = rows[2].Cells; - Assert.AreEqual(5, cells.Count); - Assert.AreEqual(false, cells[calculateColumnIndex].FormattedValue); - Assert.AreEqual(true, cells[includeIllustrationPointsColumnIndex].FormattedValue); - Assert.AreEqual("3", cells[locationNameColumnIndex].FormattedValue); - Assert.AreEqual("3", cells[locationIdColumnIndex].FormattedValue); - Assert.AreEqual(new Point2D(3, 3).ToString(), cells[locationColumnIndex].FormattedValue); - } - [Test] public void CalculateForSelectedButton_OneSelectedButCalculationGuiServiceNotSet_DoesNotThrowException() { Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/Views/LocationCalculationsViewTest.cs =================================================================== diff -u -r8638c218b3213811c20579ba8f14a377c5932002 -r818cad8d6d3258cbc9fc0606b9ceb6e89b038e77 --- Riskeer/Common/test/Riskeer.Common.Forms.Test/Views/LocationCalculationsViewTest.cs (.../LocationCalculationsViewTest.cs) (revision 8638c218b3213811c20579ba8f14a377c5932002) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/Views/LocationCalculationsViewTest.cs (.../LocationCalculationsViewTest.cs) (revision 818cad8d6d3258cbc9fc0606b9ceb6e89b038e77) @@ -25,6 +25,7 @@ using System.Linq; using System.Windows.Forms; using Core.Common.Base; +using Core.Common.Base.Geometry; using Core.Common.Controls.DataGrid; using Core.Common.Controls.Views; using Core.Common.Util.Reflection; @@ -145,7 +146,43 @@ var button = (Button) testForm.Controls.Find("CalculateForSelectedButton", true).First(); Assert.IsFalse(button.Enabled); } + + [Test] + public void HydraulicBoundaryCalculationsView_AssessmentSectionWithData_DataGridViewCorrectlyInitialized() + { + // Setup & Call + ShowFullyConfiguredTestCalculatableView(); + // Assert + DataGridView dataGridView = ControlTestHelper.GetDataGridView(testForm, "dataGridView"); + DataGridViewRowCollection rows = dataGridView.Rows; + Assert.AreEqual(3, rows.Count); + + DataGridViewCellCollection cells = rows[0].Cells; + Assert.AreEqual(5, cells.Count); + Assert.AreEqual(false, cells[calculateColumnIndex].FormattedValue); + Assert.AreEqual(false, cells[includeIllustrationPointsColumnIndex].FormattedValue); + Assert.AreEqual("1", cells[locationNameColumnIndex].FormattedValue); + Assert.AreEqual("1", cells[locationIdColumnIndex].FormattedValue); + Assert.AreEqual(new Point2D(1, 1).ToString(), cells[locationColumnIndex].FormattedValue); + + cells = rows[1].Cells; + Assert.AreEqual(5, cells.Count); + Assert.AreEqual(false, cells[calculateColumnIndex].FormattedValue); + Assert.AreEqual(false, cells[includeIllustrationPointsColumnIndex].FormattedValue); + Assert.AreEqual("2", cells[locationNameColumnIndex].FormattedValue); + Assert.AreEqual("2", cells[locationIdColumnIndex].FormattedValue); + Assert.AreEqual(new Point2D(2, 2).ToString(), cells[locationColumnIndex].FormattedValue); + + cells = rows[2].Cells; + Assert.AreEqual(5, cells.Count); + Assert.AreEqual(false, cells[calculateColumnIndex].FormattedValue); + Assert.AreEqual(true, cells[includeIllustrationPointsColumnIndex].FormattedValue); + Assert.AreEqual("3", cells[locationNameColumnIndex].FormattedValue); + Assert.AreEqual("3", cells[locationIdColumnIndex].FormattedValue); + Assert.AreEqual(new Point2D(3, 3).ToString(), cells[locationColumnIndex].FormattedValue); + } + [Test] public void Constructor_CalculateAllButtonCorrectlyInitialized() {