Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ViewInfos/MacroStabilityInwardsInputViewInfoTest.cs =================================================================== diff -u -rf07d6418a5280c74ea8a35de183dbaed51dda066 -ra8d715e72e61c66b1dc0d55ea3d42616f1c5bb1a --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ViewInfos/MacroStabilityInwardsInputViewInfoTest.cs (.../MacroStabilityInwardsInputViewInfoTest.cs) (revision f07d6418a5280c74ea8a35de183dbaed51dda066) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/ViewInfos/MacroStabilityInwardsInputViewInfoTest.cs (.../MacroStabilityInwardsInputViewInfoTest.cs) (revision a8d715e72e61c66b1dc0d55ea3d42616f1c5bb1a) @@ -20,6 +20,7 @@ // All rights reserved. using System.Linq; +using Core.Common.Base.Data; using Core.Common.Gui.Plugin; using Core.Common.TestUtil; using NUnit.Framework; @@ -113,11 +114,8 @@ new MacroStabilityInwardsFailureMechanism(), assessmentSection); - using (var view = new MacroStabilityInwardsInputView + using (var view = new MacroStabilityInwardsInputView(calculation, GetTestNormativeAssessmentLevel)) { - Data = calculation - }) - { // Call bool closeForData = info.CloseForData(view, calculationScenarioContext); @@ -144,11 +142,8 @@ new MacroStabilityInwardsFailureMechanism(), assessmentSection); - using (var view = new MacroStabilityInwardsInputView + using (var view = new MacroStabilityInwardsInputView(calculation, GetTestNormativeAssessmentLevel)) { - Data = calculation - }) - { // Call bool closeForData = info.CloseForData(view, calculationScenarioContext); @@ -175,11 +170,9 @@ Enumerable.Empty(), new MacroStabilityInwardsFailureMechanism(), assessmentSection); - using (var view = new MacroStabilityInwardsInputView + + using (var view = new MacroStabilityInwardsInputView(calculation, GetTestNormativeAssessmentLevel)) { - Data = calculation - }) - { // Call bool closeForData = info.CloseForData(view, calculationGroupContext); @@ -206,11 +199,9 @@ Enumerable.Empty(), new MacroStabilityInwardsFailureMechanism(), assessmentSection); - using (var view = new MacroStabilityInwardsInputView + + using (var view = new MacroStabilityInwardsInputView(calculation, GetTestNormativeAssessmentLevel)) { - Data = calculation - }) - { // Call bool closeForData = info.CloseForData(view, calculationGroupContext); @@ -239,11 +230,9 @@ Enumerable.Empty(), new MacroStabilityInwardsFailureMechanism(), assessmentSection); - using (var view = new MacroStabilityInwardsInputView + + using (var view = new MacroStabilityInwardsInputView(calculation, GetTestNormativeAssessmentLevel)) { - Data = calculation - }) - { // Call bool closeForData = info.CloseForData(view, calculationGroupContext); @@ -272,11 +261,9 @@ Enumerable.Empty(), new MacroStabilityInwardsFailureMechanism(), assessmentSection); - using (var view = new MacroStabilityInwardsInputView + + using (var view = new MacroStabilityInwardsInputView(calculation, GetTestNormativeAssessmentLevel)) { - Data = calculation - }) - { // Call bool closeForData = info.CloseForData(view, calculationGroupContext); @@ -299,11 +286,8 @@ var failureMechanismContext = new MacroStabilityInwardsFailureMechanismContext(failureMechanism, assessmentSection); - using (var view = new MacroStabilityInwardsInputView + using (var view = new MacroStabilityInwardsInputView(calculation, GetTestNormativeAssessmentLevel)) { - Data = calculation - }) - { // Call bool closeForData = info.CloseForData(view, failureMechanismContext); @@ -326,11 +310,8 @@ var failureMechanismContext = new MacroStabilityInwardsFailureMechanismContext(new MacroStabilityInwardsFailureMechanism(), assessmentSection); - using (var view = new MacroStabilityInwardsInputView + using (var view = new MacroStabilityInwardsInputView(calculation, GetTestNormativeAssessmentLevel)) { - Data = calculation - }) - { // Call bool closeForData = info.CloseForData(view, failureMechanismContext); @@ -356,11 +337,8 @@ var failureMechanismContext = new MacroStabilityInwardsFailureMechanismContext(failureMechanism, assessmentSection); - using (var view = new MacroStabilityInwardsInputView + using (var view = new MacroStabilityInwardsInputView(calculation, GetTestNormativeAssessmentLevel)) { - Data = calculation - }) - { // Call bool closeForData = info.CloseForData(view, failureMechanismContext); @@ -386,11 +364,8 @@ var failureMechanismContext = new MacroStabilityInwardsFailureMechanismContext(new MacroStabilityInwardsFailureMechanism(), assessmentSection); - using (var view = new MacroStabilityInwardsInputView + using (var view = new MacroStabilityInwardsInputView(calculation, GetTestNormativeAssessmentLevel)) { - Data = calculation - }) - { // Call bool closeForData = info.CloseForData(view, failureMechanismContext); @@ -408,11 +383,8 @@ var failureMechanism = new MacroStabilityInwardsFailureMechanism(); failureMechanism.CalculationsGroup.Children.Add(calculation); - using (var view = new MacroStabilityInwardsInputView + using (var view = new MacroStabilityInwardsInputView(calculation, GetTestNormativeAssessmentLevel)) { - Data = calculation - }) - { // Call bool closeForData = info.CloseForData(view, failureMechanism); @@ -429,11 +401,8 @@ var failureMechanism = new MacroStabilityInwardsFailureMechanism(); failureMechanism.CalculationsGroup.Children.Add(calculation); - using (var view = new MacroStabilityInwardsInputView + using (var view = new MacroStabilityInwardsInputView(calculation, GetTestNormativeAssessmentLevel)) { - Data = calculation - }) - { // Call bool closeForData = info.CloseForData(view, new MacroStabilityInwardsFailureMechanism()); @@ -453,11 +422,8 @@ var failureMechanism = new MacroStabilityInwardsFailureMechanism(); failureMechanism.CalculationsGroup.Children.Add(calculationGroup); - using (var view = new MacroStabilityInwardsInputView + using (var view = new MacroStabilityInwardsInputView(calculation, GetTestNormativeAssessmentLevel)) { - Data = calculation - }) - { // Call bool closeForData = info.CloseForData(view, failureMechanism); @@ -477,11 +443,8 @@ var failureMechanism = new MacroStabilityInwardsFailureMechanism(); failureMechanism.CalculationsGroup.Children.Add(calculationGroup); - using (var view = new MacroStabilityInwardsInputView + using (var view = new MacroStabilityInwardsInputView(calculation, GetTestNormativeAssessmentLevel)) { - Data = calculation - }) - { // Call bool closeForData = info.CloseForData(view, new MacroStabilityInwardsFailureMechanism()); @@ -506,11 +469,8 @@ mocks.ReplayAll(); - using (var view = new MacroStabilityInwardsInputView + using (var view = new MacroStabilityInwardsInputView(calculation, GetTestNormativeAssessmentLevel)) { - Data = calculation - }) - { // Call bool closeForData = info.CloseForData(view, assessmentSection); @@ -536,11 +496,8 @@ mocks.ReplayAll(); - using (var view = new MacroStabilityInwardsInputView + using (var view = new MacroStabilityInwardsInputView(calculation, GetTestNormativeAssessmentLevel)) { - Data = new MacroStabilityInwardsCalculationScenario() - }) - { // Call bool closeForData = info.CloseForData(view, assessmentSection); @@ -569,11 +526,8 @@ mocks.ReplayAll(); - using (var view = new MacroStabilityInwardsInputView + using (var view = new MacroStabilityInwardsInputView(calculation, GetTestNormativeAssessmentLevel)) { - Data = calculation - }) - { // Call bool closeForData = info.CloseForData(view, assessmentSection); @@ -602,11 +556,8 @@ mocks.ReplayAll(); - using (var view = new MacroStabilityInwardsInputView + using (var view = new MacroStabilityInwardsInputView(new MacroStabilityInwardsCalculationScenario(), GetTestNormativeAssessmentLevel)) { - Data = new MacroStabilityInwardsCalculationScenario() - }) - { // Call bool closeForData = info.CloseForData(view, assessmentSection); @@ -615,5 +566,10 @@ mocks.VerifyAll(); } } + + private static RoundedDouble GetTestNormativeAssessmentLevel() + { + return (RoundedDouble) 1.1; + } } } \ No newline at end of file