Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.cs =================================================================== diff -u -r2f63c812bb240ed18c030efb1be331f06f74270f -r0078247e1ebbfa5d7c4a89795778ecd995611dd5 --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.cs (.../FailureMechanismResultView.cs) (revision 2f63c812bb240ed18c030efb1be331f06f74270f) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.cs (.../FailureMechanismResultView.cs) (revision 0078247e1ebbfa5d7c4a89795778ecd995611dd5) @@ -21,14 +21,12 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using System.Linq; using System.Windows.Forms; using Core.Common.Base; using Core.Common.Controls.DataGrid; using Core.Common.Controls.Views; using Core.Common.Util.Extensions; -using Ringtoets.AssemblyTool.Data; using Ringtoets.Common.Data.Exceptions; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Forms.Controls; Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/FailureMechanismAssemblyCategoryGroupControlTestFixture.cs =================================================================== diff -u -ree93ac5bb6cb37107dfbef6ea72287cf67f83cc0 -r0078247e1ebbfa5d7c4a89795778ecd995611dd5 --- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/FailureMechanismAssemblyCategoryGroupControlTestFixture.cs (.../FailureMechanismAssemblyCategoryGroupControlTestFixture.cs) (revision ee93ac5bb6cb37107dfbef6ea72287cf67f83cc0) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/FailureMechanismAssemblyCategoryGroupControlTestFixture.cs (.../FailureMechanismAssemblyCategoryGroupControlTestFixture.cs) (revision 0078247e1ebbfa5d7c4a89795778ecd995611dd5) @@ -140,25 +140,25 @@ var failureMechanism = new TFailureMechanism(); using (new AssemblyToolCalculatorFactoryConfig()) - using (ShowFailureMechanismResultsView(failureMechanism)) { - var calculatorfactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance; + var calculatorfactory = (TestAssemblyToolCalculatorFactory)AssemblyToolCalculatorFactory.Instance; FailureMechanismAssemblyCalculatorStub calculator = calculatorfactory.LastCreatedFailureMechanismAssemblyCalculator; - calculator.ThrowExceptionOnCalculate = true; - failureMechanism.NotifyObservers(); - // Precondition - FailureMechanismAssemblyCategoryGroupControl assemblyControl = GetFailureMechanismAssemblyCategoryGroupControl(); - ErrorProvider errorProvider = GetErrorProvider(assemblyControl); - Assert.AreEqual("Message", errorProvider.GetError(assemblyControl)); + using (ShowFailureMechanismResultsView(failureMechanism)) + { + // Precondition + FailureMechanismAssemblyCategoryGroupControl assemblyControl = GetFailureMechanismAssemblyCategoryGroupControl(); + ErrorProvider errorProvider = GetErrorProvider(assemblyControl); + Assert.AreEqual("Message", errorProvider.GetError(assemblyControl)); - // When - calculator.ThrowExceptionOnCalculate = false; - failureMechanism.NotifyObservers(); + // When + calculator.ThrowExceptionOnCalculate = false; + failureMechanism.NotifyObservers(); - // Then - Assert.IsEmpty(errorProvider.GetError(assemblyControl)); + // Then + Assert.IsEmpty(errorProvider.GetError(assemblyControl)); + } } } Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/FailureMechanismAssemblyResultWithProbabilityControlTestFixture.cs =================================================================== diff -u -ree93ac5bb6cb37107dfbef6ea72287cf67f83cc0 -r0078247e1ebbfa5d7c4a89795778ecd995611dd5 --- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/FailureMechanismAssemblyResultWithProbabilityControlTestFixture.cs (.../FailureMechanismAssemblyResultWithProbabilityControlTestFixture.cs) (revision ee93ac5bb6cb37107dfbef6ea72287cf67f83cc0) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/FailureMechanismAssemblyResultWithProbabilityControlTestFixture.cs (.../FailureMechanismAssemblyResultWithProbabilityControlTestFixture.cs) (revision 0078247e1ebbfa5d7c4a89795778ecd995611dd5) @@ -148,25 +148,25 @@ var failureMechanism = new TFailureMechanism(); using (new AssemblyToolCalculatorFactoryConfig()) - using (ShowFailureMechanismResultsView(failureMechanism)) { - var calculatorfactory = (TestAssemblyToolCalculatorFactory) AssemblyToolCalculatorFactory.Instance; + var calculatorfactory = (TestAssemblyToolCalculatorFactory)AssemblyToolCalculatorFactory.Instance; FailureMechanismAssemblyCalculatorStub calculator = calculatorfactory.LastCreatedFailureMechanismAssemblyCalculator; - calculator.ThrowExceptionOnCalculate = true; - failureMechanism.NotifyObservers(); - // Precondition - FailureMechanismAssemblyControl assemblyControl = GetFailureMechanismAssemblyControl(); - ErrorProvider errorProvider = GetErrorProvider(assemblyControl); - Assert.AreEqual("Message", errorProvider.GetError(assemblyControl)); + using (ShowFailureMechanismResultsView(failureMechanism)) + { + // Precondition + FailureMechanismAssemblyControl assemblyControl = GetFailureMechanismAssemblyControl(); + ErrorProvider errorProvider = GetErrorProvider(assemblyControl); + Assert.AreEqual("Message", errorProvider.GetError(assemblyControl)); - // When - calculator.ThrowExceptionOnCalculate = false; - failureMechanism.NotifyObservers(); + // When + calculator.ThrowExceptionOnCalculate = false; + failureMechanism.NotifyObservers(); - // Then - Assert.IsEmpty(errorProvider.GetError(assemblyControl)); + // Then + Assert.IsEmpty(errorProvider.GetError(assemblyControl)); + } } }