Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresInputContextTest.cs =================================================================== diff -u -rdd72cf407b7d0e9284d101bb2e2854e569b1a29a -r6b9fda141298524c0910937dd090d82be420c52b --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresInputContextTest.cs (.../HeightStructuresInputContextTest.cs) (revision dd72cf407b7d0e9284d101bb2e2854e569b1a29a) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PresentationObjects/HeightStructuresInputContextTest.cs (.../HeightStructuresInputContextTest.cs) (revision 6b9fda141298524c0910937dd090d82be420c52b) @@ -34,55 +34,26 @@ [TestFixture] public class HeightStructuresInputContextTest { - private MockRepository mocksRepository; - - [SetUp] - public void SetUp() - { - mocksRepository = new MockRepository(); - } - [Test] - public void ConstructorWithData_Always_ExpectedPropertiesSet() + public void Constructor_ExpectedValues() { // Setup - var assessmentSectionMock = mocksRepository.StrictMock(); - mocksRepository.ReplayAll(); + var mocks = new MockRepository(); + var assessmentSectionMock = mocks.Stub(); + mocks.ReplayAll(); var input = new HeightStructuresInput(); - var calculation = new HeightStructuresCalculation(); var failureMechanism = new HeightStructuresFailureMechanism(); // Call - var context = new HeightStructuresInputContext(input, calculation, failureMechanism, assessmentSectionMock); + var context = new HeightStructuresInputContext(input, failureMechanism, assessmentSectionMock); // Assert Assert.IsInstanceOf>(context); Assert.AreEqual(input, context.WrappedData); - Assert.AreEqual(calculation, context.Calculation); Assert.AreEqual(failureMechanism, context.FailureMechanism); Assert.AreEqual(assessmentSectionMock, context.AssessmentSection); - mocksRepository.VerifyAll(); + mocks.VerifyAll(); } - - [Test] - public void Constructor_NullCalculation_ThrowsArgumentNullException() - { - // Setup - var assessmentSectionMock = mocksRepository.StrictMock(); - mocksRepository.ReplayAll(); - - var input = new HeightStructuresInput(); - var failureMechanism = new HeightStructuresFailureMechanism(); - - // Call - TestDelegate test = () => new HeightStructuresInputContext(input, null, failureMechanism, assessmentSectionMock); - - // Assert - var expectedMessage = string.Format(RingtoetsCommonFormsResources.AssertInputsAreNotNull_DataDescription_0_cannot_be_null, - Resources.HeightStructuresInputContext_DataDescription_HeightStructuresInputCalculationItem); - TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, expectedMessage); - mocksRepository.VerifyAll(); - } } } \ No newline at end of file