Index: Riskeer/Common/test/Riskeer.Common.Forms.Test/Views/CalculationsViewTest.cs =================================================================== diff -u -r3345cae48fa054132a022131bbe589a7c3537e77 -r5e916b86fb0095c3e98f89cb74efc8371c920020 --- Riskeer/Common/test/Riskeer.Common.Forms.Test/Views/CalculationsViewTest.cs (.../CalculationsViewTest.cs) (revision 3345cae48fa054132a022131bbe589a7c3537e77) +++ Riskeer/Common/test/Riskeer.Common.Forms.Test/Views/CalculationsViewTest.cs (.../CalculationsViewTest.cs) (revision 5e916b86fb0095c3e98f89cb74efc8371c920020) @@ -106,6 +106,30 @@ Assert.IsTrue(view.GenerateButtonClicked); } + [Test] + [Apartment(ApartmentState.STA)] + public void CalculationsView_ChangingSubscribedRow_ListenerCorrectlyNotified() + { + // Setup + var mocks = new MockRepository(); + var assessmentSection = mocks.Stub(); + mocks.ReplayAll(); + + TestCalculationsView calculationsView = ShowFullyConfiguredCalculationsView(assessmentSection); + + var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; + DataGridViewCell dataGridViewCell = dataGridView.Rows[0].Cells[selectableHydraulicBoundaryLocationsColumnIndex]; + dataGridView.CurrentCell = dataGridViewCell; + + // Call + dataGridViewCell.Value = dataGridView.Rows[1].Cells[selectableHydraulicBoundaryLocationsColumnIndex].Value; + + // Assert + Assert.AreEqual(1, calculationsView.HydraulicBoundaryLocationChangedCounter); + WindowsFormsTestHelper.CloseAll(); + mocks.VerifyAll(); + } + public override void Setup() { base.Setup(); @@ -774,29 +798,5 @@ } #endregion - - [Test] - [Apartment(ApartmentState.STA)] - public void CalculationsView_ChangingSubscribedRow_ListenerCorrectlyNotified() - { - // Setup - var mocks = new MockRepository(); - var assessmentSection = mocks.Stub(); - mocks.ReplayAll(); - - TestCalculationsView calculationsView = ShowFullyConfiguredCalculationsView(assessmentSection); - - var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; - DataGridViewCell dataGridViewCell = dataGridView.Rows[0].Cells[selectableHydraulicBoundaryLocationsColumnIndex]; - dataGridView.CurrentCell = dataGridViewCell; - - // Call - dataGridViewCell.Value = dataGridView.Rows[1].Cells[selectableHydraulicBoundaryLocationsColumnIndex].Value; - - // Assert - Assert.AreEqual(1, calculationsView.HydraulicBoundaryLocationChangedCounter); - WindowsFormsTestHelper.CloseAll(); - mocks.VerifyAll(); - } } } \ No newline at end of file