Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/WaveHeightLocationsContextTest.cs =================================================================== diff -u -rc114776ae9eae9848dd5841211bbe2105ae57dc7 -rc0ae8653c6cd26824e08e97a6704a466e40c2a80 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/WaveHeightLocationsContextTest.cs (.../WaveHeightLocationsContextTest.cs) (revision c114776ae9eae9848dd5841211bbe2105ae57dc7) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PresentationObjects/WaveHeightLocationsContextTest.cs (.../WaveHeightLocationsContextTest.cs) (revision c0ae8653c6cd26824e08e97a6704a466e40c2a80) @@ -42,26 +42,44 @@ mockRepository.ReplayAll(); var locations = new ObservableList(); + Func calculationFunc = hbl => null; // Call - var presentationObject = new WaveHeightLocationsContext(locations, assessmentSection); + var presentationObject = new WaveHeightLocationsContext(locations, assessmentSection, calculationFunc); // Assert Assert.IsInstanceOf>>(presentationObject); Assert.AreSame(locations, presentationObject.WrappedData); Assert.AreSame(assessmentSection, presentationObject.AssessmentSection); + Assert.AreSame(calculationFunc, presentationObject.GetCalculationFunc); mockRepository.VerifyAll(); } [Test] public void Constructor_AssessmentSectionNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => new WaveHeightLocationsContext(new ObservableList(), null); + TestDelegate call = () => new WaveHeightLocationsContext(new ObservableList(), null, hbl => null); // Assert var exception = Assert.Throws(call); Assert.AreEqual("assessmentSection", exception.ParamName); } + + [Test] + public void Constructor_GetCalculationFuncNull_ThrowsArgumentNullException() + { + // Setup + var mockRepository = new MockRepository(); + var assessmentSection = mockRepository.Stub(); + mockRepository.ReplayAll(); + + // Call + TestDelegate call = () => new WaveHeightLocationsContext(new ObservableList(), assessmentSection, null); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("getCalculationFunc", exception.ParamName); + } } } \ No newline at end of file