Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/FailureMechanism/FailureMechanismSectionCollectionTest.cs =================================================================== diff -u -rd507de965210c6af40d57936780fa55b05430e13 -r2c6d254976145b223c6055b0b8c0c8303f8038a1 --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/FailureMechanism/FailureMechanismSectionCollectionTest.cs (.../FailureMechanismSectionCollectionTest.cs) (revision d507de965210c6af40d57936780fa55b05430e13) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/FailureMechanism/FailureMechanismSectionCollectionTest.cs (.../FailureMechanismSectionCollectionTest.cs) (revision 2c6d254976145b223c6055b0b8c0c8303f8038a1) @@ -143,10 +143,15 @@ } [Test] - public void SetSections_SecondSectionDoesNotConnectToFirst_ThrowsArgumentExceptionAndDoesNotSetSections() + public void SetSections_SecondSectionDoesNotConnectToFirst_ThrowsArgumentExceptionAndOldDataRemains() { // Setup var sectionCollection = new FailureMechanismSectionCollection(); + string oldPath = TestHelper.GetScratchPadPath(); + sectionCollection.SetSections(new[] + { + FailureMechanismSectionTestFactory.CreateFailureMechanismSection() + }, oldPath); var section1 = new FailureMechanismSection("A", new[] { @@ -169,8 +174,8 @@ // Assert const string expectedMessage = "Vak 'B' sluit niet aan op de al gedefinieerde vakken van het toetsspoor."; TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, expectedMessage); - CollectionAssert.IsEmpty(sectionCollection); - Assert.IsNull(sectionCollection.SourcePath); + Assert.AreEqual(1, sectionCollection.Count()); + Assert.AreEqual(oldPath, sectionCollection.SourcePath); } [Test]