Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -r7ec5d40014c7ff2faaba8fe3bef778a9d728cc37 -rbbe059ff2ae57383fc40036c7ebb6054febdd7ba --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 7ec5d40014c7ff2faaba8fe3bef778a9d728cc37) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision bbe059ff2ae57383fc40036c7ebb6054febdd7ba) @@ -585,6 +585,15 @@ } /// + /// Looks up a localized string similar to Berekenen. + /// + public static string HydraulicBoundaryLocationDesignWaterLevelRow_Calculate { + get { + return ResourceManager.GetString("HydraulicBoundaryLocationDesignWaterLevelRow_Calculate", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Locaties van de hydraulische randvoorwaarden. /// public static string HydraulicBoundaryLocationsCollection_DisplayName { Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Properties/Resources.resx =================================================================== diff -u -r7ec5d40014c7ff2faaba8fe3bef778a9d728cc37 -rbbe059ff2ae57383fc40036c7ebb6054febdd7ba --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Properties/Resources.resx (.../Resources.resx) (revision 7ec5d40014c7ff2faaba8fe3bef778a9d728cc37) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Properties/Resources.resx (.../Resources.resx) (revision bbe059ff2ae57383fc40036c7ebb6054febdd7ba) @@ -341,4 +341,7 @@ Convergentie + + Berekenen + \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Ringtoets.Integration.Forms.csproj =================================================================== diff -u -r1795be9025cb0e054dca86a5275203966c0a9b2a -rbbe059ff2ae57383fc40036c7ebb6054febdd7ba --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Ringtoets.Integration.Forms.csproj (.../Ringtoets.Integration.Forms.csproj) (revision 1795be9025cb0e054dca86a5275203966c0a9b2a) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Ringtoets.Integration.Forms.csproj (.../Ringtoets.Integration.Forms.csproj) (revision bbe059ff2ae57383fc40036c7ebb6054febdd7ba) @@ -257,6 +257,7 @@ HydraulicBoundaryLocationDesignWaterLevelsView.cs + Designer Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/HydraulicBoundaryLocationDesignWaterLevelRow.cs =================================================================== diff -u -r7cb21cb8c5e2a67bf24b9e2858ef861a15ee537e -rbbe059ff2ae57383fc40036c7ebb6054febdd7ba --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/HydraulicBoundaryLocationDesignWaterLevelRow.cs (.../HydraulicBoundaryLocationDesignWaterLevelRow.cs) (revision 7cb21cb8c5e2a67bf24b9e2858ef861a15ee537e) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/HydraulicBoundaryLocationDesignWaterLevelRow.cs (.../HydraulicBoundaryLocationDesignWaterLevelRow.cs) (revision bbe059ff2ae57383fc40036c7ebb6054febdd7ba) @@ -49,6 +49,11 @@ } /// + /// Gets wether the is set to be calculated. + /// + public bool ToCalculate { get; set; } + + /// /// Gets the . /// public string Name Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/HydraulicBoundaryLocationDesignWaterLevelsView.Designer.cs =================================================================== diff -u -r27014b59b58198c1ff843949292fcbe4f60f6916 -rbbe059ff2ae57383fc40036c7ebb6054febdd7ba --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/HydraulicBoundaryLocationDesignWaterLevelsView.Designer.cs (.../HydraulicBoundaryLocationDesignWaterLevelsView.Designer.cs) (revision 27014b59b58198c1ff843949292fcbe4f60f6916) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/HydraulicBoundaryLocationDesignWaterLevelsView.Designer.cs (.../HydraulicBoundaryLocationDesignWaterLevelsView.Designer.cs) (revision bbe059ff2ae57383fc40036c7ebb6054febdd7ba) @@ -37,31 +37,105 @@ private void InitializeComponent() { this.dataGridViewControl = new Core.Common.Controls.DataGrid.DataGridViewControl(); + this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + this.ButtonGroupBox = new System.Windows.Forms.GroupBox(); + this.SelectAllButton = new System.Windows.Forms.Button(); + this.DeselectAllButton = new System.Windows.Forms.Button(); + this.CalculateForSelectedButton = new System.Windows.Forms.Button(); + this.tableLayoutPanel.SuspendLayout(); + this.ButtonGroupBox.SuspendLayout(); this.SuspendLayout(); // // dataGridViewControl // this.dataGridViewControl.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewControl.Location = new System.Drawing.Point(0, 0); + this.dataGridViewControl.Location = new System.Drawing.Point(3, 3); this.dataGridViewControl.MultiSelect = true; this.dataGridViewControl.Name = "dataGridViewControl"; this.dataGridViewControl.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.RowHeaderSelect; - this.dataGridViewControl.Size = new System.Drawing.Size(494, 183); + this.dataGridViewControl.Size = new System.Drawing.Size(529, 264); this.dataGridViewControl.TabIndex = 0; // - // HydraulicBoundaryLocationsView + // tableLayoutPanel // + this.tableLayoutPanel.ColumnCount = 1; + this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel.Controls.Add(this.dataGridViewControl, 0, 0); + this.tableLayoutPanel.Controls.Add(this.ButtonGroupBox, 0, 1); + this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel.Name = "tableLayoutPanel"; + this.tableLayoutPanel.RowCount = 2; + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tableLayoutPanel.Size = new System.Drawing.Size(535, 329); + this.tableLayoutPanel.TabIndex = 1; + // + // ButtonGroupBox + // + this.ButtonGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.ButtonGroupBox.Controls.Add(this.CalculateForSelectedButton); + this.ButtonGroupBox.Controls.Add(this.DeselectAllButton); + this.ButtonGroupBox.Controls.Add(this.SelectAllButton); + this.ButtonGroupBox.Location = new System.Drawing.Point(3, 275); + this.ButtonGroupBox.Margin = new System.Windows.Forms.Padding(3, 5, 3, 3); + this.ButtonGroupBox.Name = "ButtonGroupBox"; + this.ButtonGroupBox.Size = new System.Drawing.Size(529, 51); + this.ButtonGroupBox.TabIndex = 1; + this.ButtonGroupBox.TabStop = false; + this.ButtonGroupBox.Text = "Toetspeilen berekenen"; + // + // SelectAllButton + // + this.SelectAllButton.Location = new System.Drawing.Point(6, 19); + this.SelectAllButton.Name = "SelectAllButton"; + this.SelectAllButton.Size = new System.Drawing.Size(98, 23); + this.SelectAllButton.TabIndex = 0; + this.SelectAllButton.Text = "Selecteer alles"; + this.SelectAllButton.UseVisualStyleBackColor = true; + this.SelectAllButton.Click += new System.EventHandler(this.SelectAllButton_Click); + // + // DeselectAllButton + // + this.DeselectAllButton.Location = new System.Drawing.Point(110, 19); + this.DeselectAllButton.Name = "DeselectAllButton"; + this.DeselectAllButton.Size = new System.Drawing.Size(98, 23); + this.DeselectAllButton.TabIndex = 1; + this.DeselectAllButton.Text = "Deselecteer alles"; + this.DeselectAllButton.UseVisualStyleBackColor = true; + this.DeselectAllButton.Click += new System.EventHandler(this.DeselectAllButton_Click); + // + // CalculateForSelectedButton + // + this.CalculateForSelectedButton.Location = new System.Drawing.Point(214, 19); + this.CalculateForSelectedButton.Name = "CalculateForSelectedButton"; + this.CalculateForSelectedButton.Size = new System.Drawing.Size(191, 23); + this.CalculateForSelectedButton.TabIndex = 2; + this.CalculateForSelectedButton.Text = "Bereken voor geselecteerde locaties"; + this.CalculateForSelectedButton.UseVisualStyleBackColor = true; + // + // HydraulicBoundaryLocationDesignWaterLevelsView + // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.dataGridViewControl); - this.Name = "HydraulicBoundaryLocationsView"; - this.Size = new System.Drawing.Size(494, 183); + this.Controls.Add(this.tableLayoutPanel); + this.Name = "HydraulicBoundaryLocationDesignWaterLevelsView"; + this.Size = new System.Drawing.Size(535, 329); + this.tableLayoutPanel.ResumeLayout(false); + this.ButtonGroupBox.ResumeLayout(false); this.ResumeLayout(false); } #endregion private Core.Common.Controls.DataGrid.DataGridViewControl dataGridViewControl; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel; + private System.Windows.Forms.GroupBox ButtonGroupBox; + private System.Windows.Forms.Button CalculateForSelectedButton; + private System.Windows.Forms.Button DeselectAllButton; + private System.Windows.Forms.Button SelectAllButton; } } Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/HydraulicBoundaryLocationDesignWaterLevelsView.cs =================================================================== diff -u -re3f9dffa91a0def0b6e6bc7dfabef74cc64745c5 -rbbe059ff2ae57383fc40036c7ebb6054febdd7ba --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/HydraulicBoundaryLocationDesignWaterLevelsView.cs (.../HydraulicBoundaryLocationDesignWaterLevelsView.cs) (revision e3f9dffa91a0def0b6e6bc7dfabef74cc64745c5) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/HydraulicBoundaryLocationDesignWaterLevelsView.cs (.../HydraulicBoundaryLocationDesignWaterLevelsView.cs) (revision bbe059ff2ae57383fc40036c7ebb6054febdd7ba) @@ -19,11 +19,14 @@ // 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 System.Windows.Forms; using Core.Common.Base; using Core.Common.Controls.Views; using Core.Common.Gui.Selection; +using Core.Common.Utils.Extensions; using Core.Common.Utils.Reflection; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.HydraRing.Data; @@ -71,6 +74,11 @@ } } + /// + /// Gets or sets the . + /// + public IApplicationSelection ApplicationSelection { get; set; } + public object Data { get @@ -87,6 +95,14 @@ } } + public object Selection + { + get + { + return CreateSelectedItemFromCurrentRow(); + } + } + protected override void Dispose(bool disposing) { assessmentSectionObserver.Dispose(); @@ -105,7 +121,9 @@ private void InitializeDataGridView() { dataGridViewControl.AddCellClickHandler(DataGridViewOnCellClick); - + + dataGridViewControl.AddCheckBoxColumn(TypeUtils.GetMemberName(row => row.CheckedToBeCalculated), + Resources.HydraulicBoundaryLocationDesignWaterLevelRow_Calculate); dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName(row => row.Name), Resources.HydraulicBoundaryDatabase_Locations_Name_DisplayName); dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName(row => row.Id), @@ -126,21 +144,13 @@ updatingDataSource = false; } - /// - /// Gets or sets the . - /// - public IApplicationSelection ApplicationSelection { private get; set; } - - public object Selection + private IEnumerable GetHydraulicBoundaryLocationDesignWaterLevelRows() { - get - { - return CreateSelectedItemFromCurrentRow(); - } + return from DataGridViewRow row in dataGridViewControl.GetRows() select (HydraulicBoundaryLocationDesignWaterLevelRow) row.DataBoundItem; } - + #region Event handling - + private void DataGridViewOnCellClick(object sender, DataGridViewCellEventArgs e) { if (updatingDataSource) @@ -171,14 +181,26 @@ var currentRow = dataGridViewControl.GetCurrentRow(); var designWaterLevelRow = currentRow != null - ? (HydraulicBoundaryLocationDesignWaterLevelRow)currentRow.DataBoundItem - : null; + ? (HydraulicBoundaryLocationDesignWaterLevelRow) currentRow.DataBoundItem + : null; - return designWaterLevelRow != null - ? new DesignWaterLevelLocationContext(designWaterLevelRow.HydraulicBoundaryLocation) - : null; + return designWaterLevelRow != null + ? new DesignWaterLevelLocationContext(designWaterLevelRow.HydraulicBoundaryLocation) + : null; } + private void SelectAllButton_Click(object sender, EventArgs e) + { + GetHydraulicBoundaryLocationDesignWaterLevelRows().ForEachElementDo(row => row.CheckedToBeCalculated = true); + dataGridViewControl.RefreshDataGridView(); + } + + private void DeselectAllButton_Click(object sender, EventArgs e) + { + GetHydraulicBoundaryLocationDesignWaterLevelRows().ForEachElementDo(row => row.CheckedToBeCalculated = false); + dataGridViewControl.RefreshDataGridView(); + } + #endregion } } \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/HydraulicBoundaryLocationDesignWaterLevelRowTest.cs =================================================================== diff -u -r7d12b4b34fc1d160cf0aeab237b1b41a4f037aac -rbbe059ff2ae57383fc40036c7ebb6054febdd7ba --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/HydraulicBoundaryLocationDesignWaterLevelRowTest.cs (.../HydraulicBoundaryLocationDesignWaterLevelRowTest.cs) (revision 7d12b4b34fc1d160cf0aeab237b1b41a4f037aac) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/HydraulicBoundaryLocationDesignWaterLevelRowTest.cs (.../HydraulicBoundaryLocationDesignWaterLevelRowTest.cs) (revision bbe059ff2ae57383fc40036c7ebb6054febdd7ba) @@ -67,6 +67,20 @@ var expectedPoint2D = new Point2D(coordinateX, coordinateY); Assert.AreEqual(expectedPoint2D, row.Location); Assert.AreEqual(hydraulicBoundaryLocation, row.HydraulicBoundaryLocation); + Assert.IsFalse(row.ToCalculate); + } + + [Test] + public void Constructor_Property_SetPropertyAsExpected() + { + // Setup + var row = new HydraulicBoundaryLocationDesignWaterLevelRow(new HydraulicBoundaryLocation(1, "LocationName", 1.0, 2.0)); + + // Call + row.ToCalculate = true; + + // Assert + Assert.IsTrue(row.ToCalculate); } } } \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/HydraulicBoundaryLocationDesignWaterLevelsViewTest.cs =================================================================== diff -u -re3f9dffa91a0def0b6e6bc7dfabef74cc64745c5 -rbbe059ff2ae57383fc40036c7ebb6054febdd7ba --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/HydraulicBoundaryLocationDesignWaterLevelsViewTest.cs (.../HydraulicBoundaryLocationDesignWaterLevelsViewTest.cs) (revision e3f9dffa91a0def0b6e6bc7dfabef74cc64745c5) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/HydraulicBoundaryLocationDesignWaterLevelsViewTest.cs (.../HydraulicBoundaryLocationDesignWaterLevelsViewTest.cs) (revision bbe059ff2ae57383fc40036c7ebb6054febdd7ba) @@ -79,8 +79,12 @@ // Assert var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; - Assert.AreEqual(4, dataGridView.ColumnCount); + Assert.AreEqual(5, dataGridView.ColumnCount); + var locationCalculateColumn = (DataGridViewCheckBoxColumn) dataGridView.Columns[locationCalculateColumnIndex]; + const string expectedLocationCalculateHeaderText = "Berekenen"; + Assert.AreEqual(expectedLocationCalculateHeaderText, locationCalculateColumn.HeaderText); + var locationNameColumn = (DataGridViewTextBoxColumn) dataGridView.Columns[locationNameColumnIndex]; const string expectedLocationNameHeaderText = "Naam"; Assert.AreEqual(expectedLocationNameHeaderText, locationNameColumn.HeaderText); @@ -142,21 +146,24 @@ Assert.AreEqual(3, rows.Count); var cells = rows[0].Cells; - Assert.AreEqual(4, cells.Count); + Assert.AreEqual(5, cells.Count); + Assert.AreEqual(false, cells[locationCalculateColumnIndex].FormattedValue); Assert.AreEqual("1", cells[locationNameColumnIndex].FormattedValue); Assert.AreEqual("1", cells[locationIdColumnIndex].FormattedValue); Assert.AreEqual(new Point2D(1, 1).ToString(), cells[locationColumnIndex].FormattedValue); Assert.AreEqual("NaN", cells[locationDesignWaterlevelColumnIndex].FormattedValue); cells = rows[1].Cells; - Assert.AreEqual(4, cells.Count); + Assert.AreEqual(5, cells.Count); + Assert.AreEqual(false, cells[locationCalculateColumnIndex].FormattedValue); Assert.AreEqual("2", cells[locationNameColumnIndex].FormattedValue); Assert.AreEqual("2", cells[locationIdColumnIndex].FormattedValue); Assert.AreEqual(new Point2D(2, 2).ToString(), cells[locationColumnIndex].FormattedValue); Assert.AreEqual(1.23.ToString(CultureInfo.CurrentCulture), cells[locationDesignWaterlevelColumnIndex].FormattedValue); cells = rows[2].Cells; - Assert.AreEqual(4, cells.Count); + Assert.AreEqual(5, cells.Count); + Assert.AreEqual(false, cells[locationCalculateColumnIndex].FormattedValue); Assert.AreEqual("3", cells[locationNameColumnIndex].FormattedValue); Assert.AreEqual("3", cells[locationIdColumnIndex].FormattedValue); Assert.AreEqual(new Point2D(3, 3).ToString(), cells[locationColumnIndex].FormattedValue); @@ -185,7 +192,8 @@ // Assert Assert.AreEqual(1, rows.Count); var cells = rows[0].Cells; - Assert.AreEqual(4, cells.Count); + Assert.AreEqual(5, cells.Count); + Assert.AreEqual(false, cells[locationCalculateColumnIndex].FormattedValue); Assert.AreEqual("10", cells[locationNameColumnIndex].FormattedValue); Assert.AreEqual("10", cells[locationIdColumnIndex].FormattedValue); Assert.AreEqual(new Point2D(10, 10).ToString(), cells[locationColumnIndex].FormattedValue); @@ -236,7 +244,7 @@ var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; // Call - dataGridView.CurrentCell = dataGridView.Rows[1].Cells[0]; + dataGridView.CurrentCell = dataGridView.Rows[1].Cells[locationNameColumnIndex]; EventHelper.RaiseEvent(dataGridView, "CellClick", new DataGridViewCellEventArgs(1, 0)); // Assert @@ -260,8 +268,8 @@ var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; // Call - dataGridView.CurrentCell = dataGridView.Rows[1].Cells[0]; - EventHelper.RaiseEvent(dataGridView, "CellClick", new DataGridViewCellEventArgs(1, 0)); + dataGridView.CurrentCell = dataGridView.Rows[1].Cells[locationNameColumnIndex]; + EventHelper.RaiseEvent(dataGridView, "CellClick", new DataGridViewCellEventArgs(locationNameColumnIndex, 0)); // Assert mocks.VerifyAll(); @@ -276,7 +284,7 @@ // Setup var view = ShowFullyConfiguredHydraulicBoundaryLocationDesignWaterLevelsView(); var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; - dataGridView.CurrentCell = dataGridView.Rows[selectedRow].Cells[0]; + dataGridView.CurrentCell = dataGridView.Rows[selectedRow].Cells[locationNameColumnIndex]; // Call var selection = view.Selection; @@ -288,11 +296,65 @@ Assert.AreSame(dataRow.HydraulicBoundaryLocation, ((DesignWaterLevelLocationContext) selection).WrappedData); } - private const int locationNameColumnIndex = 0; - private const int locationIdColumnIndex = 1; - private const int locationColumnIndex = 2; - private const int locationDesignWaterlevelColumnIndex = 3; + [Test] + public void SelectAllButton_SelectAllButtonClicked_AllLocationsSelected() + { + // Setup + ShowFullyConfiguredHydraulicBoundaryLocationDesignWaterLevelsView(); + var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; + var rows = dataGridView.Rows; + var button = new ButtonTester("SelectAllButton", testForm); + + // Precondition + Assert.IsFalse((bool) rows[0].Cells[locationCalculateColumnIndex].Value); + Assert.IsFalse((bool) rows[1].Cells[locationCalculateColumnIndex].Value); + Assert.IsFalse((bool) rows[2].Cells[locationCalculateColumnIndex].Value); + + // Call + button.Click(); + + // Assert + Assert.IsTrue((bool) rows[0].Cells[locationCalculateColumnIndex].Value); + Assert.IsTrue((bool) rows[1].Cells[locationCalculateColumnIndex].Value); + Assert.IsTrue((bool) rows[2].Cells[locationCalculateColumnIndex].Value); + } + + [Test] + public void DeselectAllButton_AllLocationsSelectedDeselectAllButtonClicked_AllLocationsNotSelected() + { + // Setup + ShowFullyConfiguredHydraulicBoundaryLocationDesignWaterLevelsView(); + + var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; + var rows = dataGridView.Rows; + var button = new ButtonTester("DeselectAllButton", testForm); + + foreach (DataGridViewRow row in rows) + { + row.Cells[locationCalculateColumnIndex].Value = true; + } + + // Precondition + Assert.IsTrue((bool) rows[0].Cells[locationCalculateColumnIndex].Value); + Assert.IsTrue((bool) rows[1].Cells[locationCalculateColumnIndex].Value); + Assert.IsTrue((bool) rows[2].Cells[locationCalculateColumnIndex].Value); + + // Call + button.Click(); + + // Assert + Assert.IsFalse((bool)rows[0].Cells[locationCalculateColumnIndex].Value); + Assert.IsFalse((bool)rows[1].Cells[locationCalculateColumnIndex].Value); + Assert.IsFalse((bool)rows[2].Cells[locationCalculateColumnIndex].Value); + } + + private const int locationCalculateColumnIndex = 0; + private const int locationNameColumnIndex = 1; + private const int locationIdColumnIndex = 2; + private const int locationColumnIndex = 3; + private const int locationDesignWaterlevelColumnIndex = 4; + private HydraulicBoundaryLocationDesignWaterLevelsView ShowHydraulicBoundaryLocationDesignWaterLevelsView() { var view = new HydraulicBoundaryLocationDesignWaterLevelsView();