Index: Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Views/AssemblyResultTotalViewTest.cs =================================================================== diff -u -r7d4dbbbd491634aba27874344b308618e90365df -r9ff100f9b6eb3ea77c5ef24df5a9d66b9d964440 --- Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Views/AssemblyResultTotalViewTest.cs (.../AssemblyResultTotalViewTest.cs) (revision 7d4dbbbd491634aba27874344b308618e90365df) +++ Riskeer/Integration/test/Riskeer.Integration.Forms.Test/Views/AssemblyResultTotalViewTest.cs (.../AssemblyResultTotalViewTest.cs) (revision 9ff100f9b6eb3ea77c5ef24df5a9d66b9d964440) @@ -169,7 +169,6 @@ { // Given AssessmentSection assessmentSection = CreateAssessmentSection(); - assessmentSection.GetFailureMechanisms().ForEachElementDo(fm => fm.AssemblyResult.ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticP2); using (new AssemblyToolCalculatorFactoryConfig()) { @@ -192,7 +191,6 @@ { // Given AssessmentSection assessmentSection = CreateAssessmentSection(); - assessmentSection.GetFailureMechanisms().ForEachElementDo(fm => fm.AssemblyResult.ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticP2); using (new AssemblyToolCalculatorFactoryConfig()) using (ShowAssemblyResultTotalView(assessmentSection)) @@ -207,7 +205,6 @@ { // Given AssessmentSection assessmentSection = CreateAssessmentSection(); - assessmentSection.GetFailureMechanisms().ForEachElementDo(fm => fm.AssemblyResult.ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticP2); using (new AssemblyToolCalculatorFactoryConfig()) using (ShowAssemblyResultTotalView(assessmentSection)) @@ -237,7 +234,6 @@ { // Given AssessmentSection assessmentSection = CreateAssessmentSection(); - assessmentSection.GetFailureMechanisms().ForEachElementDo(fm => fm.AssemblyResult.ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticP2); using (new AssemblyToolCalculatorFactoryConfig()) using (ShowAssemblyResultTotalView(assessmentSection)) @@ -265,7 +261,6 @@ { // Given AssessmentSection assessmentSection = CreateAssessmentSection(); - assessmentSection.GetFailureMechanisms().ForEachElementDo(fm => fm.AssemblyResult.ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticP2); using (new AssemblyToolCalculatorFactoryConfig()) { @@ -488,7 +483,6 @@ { // Given AssessmentSection assessmentSection = CreateAssessmentSection(); - assessmentSection.GetFailureMechanisms().ForEachElementDo(fm => fm.AssemblyResult.ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticP2); using (new AssemblyToolCalculatorFactoryConfig()) using (AssemblyResultTotalView view = ShowAssemblyResultTotalView(assessmentSection)) @@ -531,8 +525,6 @@ // Given AssessmentSection assessmentSection = CreateAssessmentSection(); AddSpecificFailureMechanisms(assessmentSection); - assessmentSection.GetFailureMechanisms().ForEachElementDo(fm => fm.AssemblyResult.ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticP2); - assessmentSection.SpecificFailureMechanisms.ForEachElementDo(fm => fm.AssemblyResult.ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticP2); using (new AssemblyToolCalculatorFactoryConfig()) using (AssemblyResultTotalView view = ShowAssemblyResultTotalView(assessmentSection)) @@ -565,15 +557,29 @@ private static AssessmentSection CreateAssessmentSection() { var assessmentSection = new AssessmentSection(new Random(21).NextEnumValue()); + assessmentSection.GetFailureMechanisms().ForEachElementDo( + fm => fm.AssemblyResult.ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticP2); return assessmentSection; } - private static void AddSpecificFailureMechanisms(AssessmentSection assessmentSection) + private static void AddSpecificFailureMechanisms(IAssessmentSection assessmentSection) { assessmentSection.SpecificFailureMechanisms.AddRange(new[] { - new SpecificFailureMechanism(), - new SpecificFailureMechanism() + new SpecificFailureMechanism + { + AssemblyResult = + { + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticP1 + } + }, + new SpecificFailureMechanism + { + AssemblyResult = + { + ProbabilityResultType = FailureMechanismAssemblyProbabilityResultType.AutomaticP1 + } + } }); }