Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssemblyResultTotalViewTest.cs =================================================================== diff -u -r07a522abc1dd58ba18e7dea06fd2296f1e820771 -r9bf0fc986826a6ad2e2a812e0f502c567c544c59 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssemblyResultTotalViewTest.cs (.../AssemblyResultTotalViewTest.cs) (revision 07a522abc1dd58ba18e7dea06fd2296f1e820771) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/AssemblyResultTotalViewTest.cs (.../AssemblyResultTotalViewTest.cs) (revision 9bf0fc986826a6ad2e2a812e0f502c567c544c59) @@ -233,7 +233,8 @@ using (new AssemblyToolCalculatorFactoryConfig()) using (ShowAssemblyResultTotalView()) { - GetRefreshAssemblyResultButtonTester().Properties.Enabled = true; + ButtonTester buttonTester = GetRefreshAssemblyResultButtonTester(); + buttonTester.Properties.Enabled = true; // Precondition AssertAssessmentSectionAssemblyCategoryGroupControl(totalControlName, "C"); @@ -247,7 +248,7 @@ calculator.AssembleFailureMechanismsAssemblyOutput = new AssessmentSectionAssembly(0.5, AssessmentSectionAssemblyCategoryGroup.APlus); calculator.AssembleFailureMechanismsAssemblyCategoryGroupOutput = AssessmentSectionAssemblyCategoryGroup.B; - GetRefreshAssemblyResultButtonTester().Click(); + buttonTester.Click(); // Then AssertAssessmentSectionAssemblyCategoryGroupControl(totalControlName, "A"); @@ -263,7 +264,8 @@ using (new AssemblyToolCalculatorFactoryConfig()) using (ShowAssemblyResultTotalView()) { - GetRefreshAssemblyResultButtonTester().Properties.Enabled = true; + ButtonTester buttonTester = GetRefreshAssemblyResultButtonTester(); + buttonTester.Properties.Enabled = true; // Precondition AssertAssessmentSectionAssemblyCategoryGroupControl(totalControlName, "C"); @@ -275,7 +277,7 @@ AssessmentSectionAssemblyCalculatorStub calculator = calculatorfactory.LastCreatedAssessmentSectionAssemblyCalculator; calculator.ThrowExceptionOnCalculate = true; - GetRefreshAssemblyResultButtonTester().Click(); + buttonTester.Click(); // Then AssertAssessmentSectionAssemblyWithoutProbabilityControlWithError(totalControlName); @@ -296,7 +298,8 @@ using (ShowAssemblyResultTotalView()) { - GetRefreshAssemblyResultButtonTester().Properties.Enabled = true; + ButtonTester buttonTester = GetRefreshAssemblyResultButtonTester(); + buttonTester.Properties.Enabled = true; // Precondition AssertAssessmentSectionAssemblyWithoutProbabilityControlWithError(totalControlName); @@ -305,7 +308,7 @@ // When calculator.ThrowExceptionOnCalculate = false; - GetRefreshAssemblyResultButtonTester().Click(); + buttonTester.Click(); // Then AssertAssessmentSectionAssemblyCategoryGroupControl(totalControlName, "C"); @@ -333,7 +336,8 @@ var calculatorfactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance; FailureMechanismAssemblyCalculatorStub calculator = calculatorfactory.LastCreatedFailureMechanismAssemblyCalculator; - GetRefreshAssemblyResultButtonTester().Properties.Enabled = true; + ButtonTester buttonTester = GetRefreshAssemblyResultButtonTester(); + buttonTester.Properties.Enabled = true; var invalidated = false; DataGridView dataGridView = GetDataGridView(); @@ -353,7 +357,6 @@ calculator.FailureMechanismAssemblyOutput = newAssemblyResult; calculator.FailureMechanismAssemblyCategoryGroupOutput = newCategoryGroup; - ButtonTester buttonTester = GetRefreshAssemblyResultButtonTester(); buttonTester.Click(); // Then @@ -370,7 +373,8 @@ // Given using (ShowAssemblyResultTotalView()) { - GetRefreshAssemblyResultButtonTester().Properties.Enabled = true; + ButtonTester buttonTester = GetRefreshAssemblyResultButtonTester(); + buttonTester.Properties.Enabled = true; DataGridView dataGridView = GetDataGridView(); dataGridView.CellFormatting += (sender, args) => { @@ -382,7 +386,6 @@ }; // When - ButtonTester buttonTester = GetRefreshAssemblyResultButtonTester(); buttonTester.Click(); // Then