Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresScenariosViewIntegrationTest.cs =================================================================== diff -u -r3e79015849651b140c9b496e8f0f57fcdcac0d92 -rf989a06ad41e4081dd1d155fafa263e94b070816 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresScenariosViewIntegrationTest.cs (.../HeightStructuresScenariosViewIntegrationTest.cs) (revision 3e79015849651b140c9b496e8f0f57fcdcac0d92) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresScenariosViewIntegrationTest.cs (.../HeightStructuresScenariosViewIntegrationTest.cs) (revision f989a06ad41e4081dd1d155fafa263e94b070816) @@ -88,7 +88,7 @@ new HeightStructuresImporter(assessmentSection.HeightStructures.HeightStructures, assessmentSection.ReferenceLine, filePath) - .Import(); + .Import(); CalculationGroup calculationsGroup = assessmentSection.HeightStructures.CalculationsGroup; var view = new HeightStructuresScenariosView() @@ -101,6 +101,7 @@ var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; + // Call foreach (var profile in assessmentSection.HeightStructures.HeightStructures) { @@ -109,7 +110,7 @@ Name = NamingHelper.GetUniqueName(((CalculationGroup) view.Data).Children, profile.Name, c => c.Name), InputParameters = { - Structure = profile + HeightStructure = profile } }); } @@ -119,7 +120,7 @@ DataGridViewCell dataGridViewCell = dataGridView.Rows[13].Cells[1]; Assert.AreEqual(2, ((DataGridViewComboBoxCell) dataGridViewCell).Items.Count); Assert.AreEqual("", ((DataGridViewComboBoxCell) dataGridViewCell).Items[0].ToString()); - Assert.AreEqual("Eerste kunstwerk 6-3", ((DataGridViewComboBoxCell) dataGridViewCell).Items[1].ToString()); + Assert.AreEqual("Eerste kunstwerk 6-3", ((DataGridViewComboBoxCell)dataGridViewCell).Items[1].ToString()); } } @@ -135,7 +136,7 @@ new HeightStructuresImporter(assessmentSection.HeightStructures.HeightStructures, assessmentSection.ReferenceLine, filePath) - .Import(); + .Import(); CalculationGroup calculationsGroup = assessmentSection.HeightStructures.CalculationsGroup; var view = new HeightStructuresScenariosView() @@ -148,14 +149,15 @@ var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; + foreach (var profile in assessmentSection.HeightStructures.HeightStructures) { calculationsGroup.Children.Add(new HeightStructuresCalculation { Name = NamingHelper.GetUniqueName(calculationsGroup.Children, profile.Name, c => c.Name), InputParameters = { - Structure = profile + HeightStructure = profile } }); } @@ -172,7 +174,7 @@ DataGridViewCell dataGridViewCell = dataGridView.Rows[13].Cells[1]; Assert.AreEqual(2, ((DataGridViewComboBoxCell) dataGridViewCell).Items.Count); Assert.AreEqual("", ((DataGridViewComboBoxCell) dataGridViewCell).Items[0].ToString()); - Assert.AreEqual("Eerste kunstwerk 6-3_changed", ((DataGridViewComboBoxCell) dataGridViewCell).Items[1].ToString()); + Assert.AreEqual("Eerste kunstwerk 6-3_changed", ((DataGridViewComboBoxCell)dataGridViewCell).Items[1].ToString()); } } @@ -188,7 +190,7 @@ new HeightStructuresImporter(assessmentSection.HeightStructures.HeightStructures, assessmentSection.ReferenceLine, filePath) - .Import(); + .Import(); var view = new HeightStructuresScenariosView() { @@ -207,22 +209,22 @@ Name = NamingHelper.GetUniqueName(assessmentSection.HeightStructures.CalculationsGroup.Children, profile.Name + "Calculation", c => c.Name), InputParameters = { - Structure = profile + HeightStructure = profile } }); } // Call var calculationsGroup = assessmentSection.HeightStructures.CalculationsGroup; - ((HeightStructuresCalculation) calculationsGroup.Children[1]).InputParameters.Structure = - ((HeightStructuresCalculation) calculationsGroup.Children[0]).InputParameters.Structure; + ((HeightStructuresCalculation) calculationsGroup.Children[1]).InputParameters.HeightStructure = + ((HeightStructuresCalculation) calculationsGroup.Children[0]).InputParameters.HeightStructure; calculationsGroup.NotifyObservers(); // Assert DataGridViewCell dataGridViewCell = dataGridView.Rows[13].Cells[1]; Assert.AreEqual(3, ((DataGridViewComboBoxCell) dataGridViewCell).Items.Count); Assert.AreEqual("", ((DataGridViewComboBoxCell) dataGridViewCell).Items[0].ToString()); - Assert.AreEqual("Eerste kunstwerk 6-3Calculation", ((DataGridViewComboBoxCell) dataGridViewCell).Items[1].ToString()); + Assert.AreEqual("Eerste kunstwerk 6-3Calculation", ((DataGridViewComboBoxCell)dataGridViewCell).Items[1].ToString()); Assert.AreEqual("Tweede kunstwerk 6-3Calculation", ((DataGridViewComboBoxCell) dataGridViewCell).Items[2].ToString()); DataGridViewCell dataGridViewCellWithRemovedCalculation = dataGridView.Rows[56].Cells[1];