Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/AssessmentSectionTestHelper.cs =================================================================== diff -u -r9e4ea78a7073d17196f09f6edebc35ed7ce69348 -r2d7781915c424dbd7887718775d4eb6e42a96503 --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/AssessmentSectionTestHelper.cs (.../AssessmentSectionTestHelper.cs) (revision 9e4ea78a7073d17196f09f6edebc35ed7ce69348) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil/AssessmentSectionTestHelper.cs (.../AssessmentSectionTestHelper.cs) (revision 2d7781915c424dbd7887718775d4eb6e42a96503) @@ -49,10 +49,9 @@ { var assessmentSection = mockRepository.Stub(); assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(new HydraulicBoundaryDatabase()); + assessmentSection.Stub(a => a.ReferenceLine).Return(new ReferenceLine()); assessmentSection.Replay(); - assessmentSection.ReferenceLine = new ReferenceLine(); - return assessmentSection; } @@ -73,14 +72,12 @@ var assessmentSection = mockRepository.Stub(); assessmentSection.Stub(a => a.Id).Return("21"); - assessmentSection.Stub(a => a.FailureMechanismContribution).Return(new FailureMechanismContribution(0.1, - 1.0 / 30000)); + assessmentSection.Stub(a => a.FailureMechanismContribution).Return(new FailureMechanismContribution(0.1, 1.0 / 30000)); assessmentSection.Stub(a => a.GetFailureMechanisms()).Return(failureMechanisms); assessmentSection.Stub(a => a.HydraulicBoundaryDatabase).Return(GetHydraulicBoundaryDatabase(filePath)); + assessmentSection.Stub(a => a.ReferenceLine).Return(new ReferenceLine()); assessmentSection.Replay(); - assessmentSection.ReferenceLine = new ReferenceLine(); - return assessmentSection; } Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/ReferenceLineContextTest.cs =================================================================== diff -u -r2a81f01756e227d5ce93717b21b87e8a5cd5fcbb -r2d7781915c424dbd7887718775d4eb6e42a96503 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/ReferenceLineContextTest.cs (.../ReferenceLineContextTest.cs) (revision 2a81f01756e227d5ce93717b21b87e8a5cd5fcbb) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/ReferenceLineContextTest.cs (.../ReferenceLineContextTest.cs) (revision 2d7781915c424dbd7887718775d4eb6e42a96503) @@ -31,17 +31,14 @@ public class ReferenceLineContextTest { [Test] - public void ParameteredConstructor_ExpectedValues() + public void Constructor_ExpectedValues() { // Setup var mocks = new MockRepository(); var assessmentSection = mocks.Stub(); + assessmentSection.Stub(a => a.ReferenceLine).Return(new ReferenceLine()); mocks.ReplayAll(); - var referenceLine = new ReferenceLine(); - - assessmentSection.ReferenceLine = referenceLine; - // Call var referenceLineContext = new ReferenceLineContext(assessmentSection); Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/UpdateInfos/RingtoetsUpdateInfoFactoryTest.cs =================================================================== diff -u -r2a81f01756e227d5ce93717b21b87e8a5cd5fcbb -r2d7781915c424dbd7887718775d4eb6e42a96503 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/UpdateInfos/RingtoetsUpdateInfoFactoryTest.cs (.../RingtoetsUpdateInfoFactoryTest.cs) (revision 2a81f01756e227d5ce93717b21b87e8a5cd5fcbb) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/UpdateInfos/RingtoetsUpdateInfoFactoryTest.cs (.../RingtoetsUpdateInfoFactoryTest.cs) (revision 2d7781915c424dbd7887718775d4eb6e42a96503) @@ -59,7 +59,7 @@ var mocks = new MockRepository(); var sectionResultUpdateStrategy = mocks.Stub>(); var assessmentSection = mocks.Stub(); - assessmentSection.ReferenceLine = new ReferenceLine(); + assessmentSection.Stub(a => a.ReferenceLine).Return(new ReferenceLine()); mocks.ReplayAll(); // Call @@ -86,7 +86,7 @@ var mocks = new MockRepository(); var sectionResultUpdateStrategy = mocks.Stub>(); var assessmentSection = mocks.Stub(); - assessmentSection.ReferenceLine = new ReferenceLine(); + assessmentSection.Stub(a => a.ReferenceLine).Return(new ReferenceLine()); mocks.ReplayAll(); // Call @@ -107,7 +107,7 @@ var mocks = new MockRepository(); var sectionResultUpdateStrategy = mocks.Stub>(); var assessmentSection = mocks.Stub(); - assessmentSection.ReferenceLine = new ReferenceLine(); + assessmentSection.Stub(a => a.ReferenceLine).Return(new ReferenceLine()); mocks.ReplayAll(); // Call @@ -129,7 +129,7 @@ var mocks = new MockRepository(); var sectionResultUpdateStrategy = mocks.Stub>(); var assessmentSection = mocks.Stub(); - assessmentSection.ReferenceLine = new ReferenceLine(); + assessmentSection.Stub(a => a.ReferenceLine).Return(new ReferenceLine()); mocks.ReplayAll(); // Call @@ -152,7 +152,7 @@ var mocks = new MockRepository(); var sectionResultUpdateStrategy = mocks.Stub>(); var assessmentSection = mocks.Stub(); - assessmentSection.ReferenceLine = new ReferenceLine(); + assessmentSection.Stub(a => a.ReferenceLine).Return(new ReferenceLine()); mocks.ReplayAll(); // Call @@ -172,7 +172,7 @@ var mocks = new MockRepository(); var sectionResultUpdateStrategy = mocks.Stub>(); var assessmentSection = mocks.Stub(); - assessmentSection.ReferenceLine = new ReferenceLine(); + assessmentSection.Stub(a => a.ReferenceLine).Return(new ReferenceLine()); mocks.ReplayAll(); // Call Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/FileImporters/ForeshoreProfilesImporterTest.cs =================================================================== diff -u -r2a81f01756e227d5ce93717b21b87e8a5cd5fcbb -r2d7781915c424dbd7887718775d4eb6e42a96503 --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/FileImporters/ForeshoreProfilesImporterTest.cs (.../ForeshoreProfilesImporterTest.cs) (revision 2a81f01756e227d5ce93717b21b87e8a5cd5fcbb) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/FileImporters/ForeshoreProfilesImporterTest.cs (.../ForeshoreProfilesImporterTest.cs) (revision 2d7781915c424dbd7887718775d4eb6e42a96503) @@ -162,12 +162,11 @@ ReferenceLine referenceLine = CreateMatchingReferenceLine(); var foreshoreProfiles = new ForeshoreProfileCollection(); - var assessmentSection = mockRepository.Stub(); - assessmentSection.ReferenceLine = referenceLine; + var assessmentSection = mockRepository.Stub(); + assessmentSection.Stub(a => a.ReferenceLine).Return(referenceLine); var messageProvider = mockRepository.Stub(); var strategy = mockRepository.StrictMock(); - mockRepository.ReplayAll(); var foreshoreProfilesImporter = new ForeshoreProfilesImporter(foreshoreProfiles, referenceLine, filePath, strategy, messageProvider); @@ -254,7 +253,7 @@ var strategy = mockRepository.StrictMock(); var assessmentSection = mockRepository.Stub(); - assessmentSection.ReferenceLine = referenceLine; + assessmentSection.Stub(a => a.ReferenceLine).Return(referenceLine); mockRepository.ReplayAll(); var foreshoreProfilesImporter = new ForeshoreProfilesImporter(foreshoreProfiles, referenceLine, filePath, strategy, messageProvider); @@ -279,7 +278,7 @@ ReferenceLine referenceLine = CreateMatchingReferenceLine(); var assessmentSection = mockRepository.Stub(); - assessmentSection.ReferenceLine = referenceLine; + assessmentSection.Stub(a => a.ReferenceLine).Return(referenceLine); var foreshoreProfiles = new ForeshoreProfileCollection(); var strategy = mockRepository.StrictMock(); @@ -337,7 +336,7 @@ var observer = mockRepository.StrictMock(); ReferenceLine referenceLine = CreateMatchingReferenceLine(); var assessmentSection = mockRepository.Stub(); - assessmentSection.ReferenceLine = referenceLine; + assessmentSection.Stub(a => a.ReferenceLine).Return(referenceLine); var failureMechanism = mockRepository.Stub(); var strategy = mockRepository.StrictMock(); @@ -407,7 +406,7 @@ var observer = mockRepository.StrictMock(); ReferenceLine referenceLine = CreateMatchingReferenceLine(); var assessmentSection = mockRepository.Stub(); - assessmentSection.ReferenceLine = referenceLine; + assessmentSection.Stub(a => a.ReferenceLine).Return(referenceLine); var failureMechanism = mockRepository.Stub(); var foreshoreProfiles = new ForeshoreProfileCollection(); @@ -469,7 +468,7 @@ ReferenceLine referenceLine = CreateMatchingReferenceLine(); var assessmentSection = mockRepository.Stub(); - assessmentSection.ReferenceLine = referenceLine; + assessmentSection.Stub(a => a.ReferenceLine).Return(referenceLine); const string cancelledLogMessage = "Operation cancelled"; var messageProvider = mockRepository.StrictMock(); @@ -510,7 +509,7 @@ ReferenceLine referenceLine = CreateMatchingReferenceLine(); var assessmentSection = mockRepository.Stub(); - assessmentSection.ReferenceLine = referenceLine; + assessmentSection.Stub(a => a.ReferenceLine).Return(referenceLine); const string cancelledLogMessage = "Operation cancelled"; var messageProvider = mockRepository.StrictMock(); @@ -549,7 +548,7 @@ ReferenceLine referenceLine = CreateMatchingReferenceLine(); var assessmentSection = mockRepository.Stub(); - assessmentSection.ReferenceLine = referenceLine; + assessmentSection.Stub(a => a.ReferenceLine).Return(referenceLine); var foreshoreProfiles = new ForeshoreProfileCollection(); var strategy = mockRepository.StrictMock(); @@ -636,7 +635,7 @@ ReferenceLine referenceLine = CreateMatchingReferenceLine(); var assessmentSection = mockRepository.Stub(); - assessmentSection.ReferenceLine = referenceLine; + assessmentSection.Stub(a => a.ReferenceLine).Return(referenceLine); var strategy = mockRepository.StrictMock(); var foreshoreProfiles = new ForeshoreProfileCollection(); Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLines/ReferenceLineImporterTest.cs =================================================================== diff -u -r2a81f01756e227d5ce93717b21b87e8a5cd5fcbb -r2d7781915c424dbd7887718775d4eb6e42a96503 --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLines/ReferenceLineImporterTest.cs (.../ReferenceLineImporterTest.cs) (revision 2a81f01756e227d5ce93717b21b87e8a5cd5fcbb) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLines/ReferenceLineImporterTest.cs (.../ReferenceLineImporterTest.cs) (revision 2d7781915c424dbd7887718775d4eb6e42a96503) @@ -219,7 +219,7 @@ var mocks = new MockRepository(); var assessmentSection = mocks.Stub(); - assessmentSection.ReferenceLine = originalReferenceLine; + assessmentSection.Stub(a => a.ReferenceLine).Return(originalReferenceLine); var handler = mocks.StrictMock(); handler.Expect(h => h.ConfirmReplace()).Return(false); handler.Expect(h => h.Replace(null, null)) @@ -250,7 +250,7 @@ var mocks = new MockRepository(); var assessmentSection = mocks.Stub(); - assessmentSection.ReferenceLine = originalReferenceLine; + assessmentSection.Stub(a => a.ReferenceLine).Return(originalReferenceLine); var handler = mocks.StrictMock(); var importer = new ReferenceLineImporter(assessmentSection, handler, path); handler.Expect(h => h.ConfirmReplace()) @@ -281,7 +281,7 @@ var mocks = new MockRepository(); var assessmentSection = mocks.Stub(); - assessmentSection.ReferenceLine = originalReferenceLine; + assessmentSection.Stub(a => a.ReferenceLine).Return(originalReferenceLine); var handler = mocks.Stub(); handler.Stub(h => h.ConfirmReplace()) .Return(true); @@ -316,7 +316,7 @@ var mocks = new MockRepository(); var assessmentSection = mocks.Stub(); - assessmentSection.ReferenceLine = originalReferenceLine; + assessmentSection.Stub(a => a.ReferenceLine).Return(originalReferenceLine); var handler = mocks.Stub(); handler.Stub(h => h.ConfirmReplace()) .Return(true); @@ -398,7 +398,7 @@ contextObserver.Expect(o => o.UpdateObserver()); var assessmentSection = mocks.Stub(); - assessmentSection.ReferenceLine = originalReferenceLine; + assessmentSection.Stub(a => a.ReferenceLine).Return(originalReferenceLine); assessmentSection.Expect(section => section.Attach(contextObserver)); assessmentSection.Expect(section => section.NotifyObservers()).Do((Action) (() => contextObserver.UpdateObserver())); @@ -449,7 +449,7 @@ var mocks = new MockRepository(); var contextObserver = mocks.StrictMock(); var assessmentSection = mocks.Stub(); - assessmentSection.ReferenceLine = originalReferenceLine; + assessmentSection.Stub(a => a.ReferenceLine).Return(originalReferenceLine); assessmentSection.Expect(section => section.Attach(contextObserver)); var handler = mocks.StrictMock(); @@ -487,7 +487,7 @@ contextObserver.Expect(o => o.UpdateObserver()); var assessmentSection = mocks.Stub(); - assessmentSection.ReferenceLine = originalReferenceLine; + assessmentSection.Stub(a => a.ReferenceLine).Return(originalReferenceLine); assessmentSection.Expect(section => section.Attach(contextObserver)); assessmentSection.Expect(section => section.NotifyObservers()).Do((Action) (() => contextObserver.UpdateObserver()));