Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaveImpactAsphaltCover/WaveImpactAsphaltCoverFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -r98f01944e8ac182e2a1e9b1ed4deb48a07952529 -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaveImpactAsphaltCover/WaveImpactAsphaltCoverFailureMechanismCreateExtensionsTest.cs (.../WaveImpactAsphaltCoverFailureMechanismCreateExtensionsTest.cs) (revision 98f01944e8ac182e2a1e9b1ed4deb48a07952529) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaveImpactAsphaltCover/WaveImpactAsphaltCoverFailureMechanismCreateExtensionsTest.cs (.../WaveImpactAsphaltCoverFailureMechanismCreateExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -58,7 +58,18 @@ var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism { IsRelevant = isRelevant, - Comments = "Some text" + InputComments = + { + Comments = "Some input text" + }, + OutputComments = + { + Comments = "Some output text" + }, + NotRelevantComments = + { + Comments = "Really not relevant" + } }; var registry = new PersistenceRegistry(); @@ -69,27 +80,48 @@ Assert.IsNotNull(entity); Assert.AreEqual((short) FailureMechanismType.WaveImpactOnAsphaltRevetment, entity.FailureMechanismType); Assert.AreEqual(Convert.ToByte(isRelevant), entity.IsRelevant); - Assert.AreEqual(failureMechanism.Comments, entity.Comments); + Assert.AreEqual(failureMechanism.InputComments.Comments, entity.InputComments); + Assert.AreEqual(failureMechanism.OutputComments.Comments, entity.OutputComments); + Assert.AreEqual(failureMechanism.NotRelevantComments.Comments, entity.NotRelevantComments); } [Test] public void Create_StringPropertiesDoNotShareReference() { // Setup - const string originalComments = "Some text"; + const string originalInput = "Some input text"; + const string originalOutput = "Some output text"; + const string originalNotRelevantText = "Really not relevant"; var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism { - Comments = originalComments + InputComments = + { + Comments = originalInput + }, + OutputComments = + { + Comments = originalOutput + }, + NotRelevantComments = + { + Comments = originalNotRelevantText + } }; var registry = new PersistenceRegistry(); // Call FailureMechanismEntity entity = failureMechanism.Create(registry); // Assert - Assert.AreNotSame(originalComments, entity.Comments, + Assert.AreNotSame(originalInput, entity.InputComments, "To create stable binary representations/fingerprints, it's really important that strings are not shared."); - Assert.AreEqual(originalComments, entity.Comments); + Assert.AreEqual(failureMechanism.InputComments.Comments, entity.InputComments); + Assert.AreNotSame(originalOutput, entity.OutputComments, + "To create stable binary representations/fingerprints, it's really important that strings are not shared."); + Assert.AreEqual(failureMechanism.OutputComments.Comments, entity.OutputComments); + Assert.AreNotSame(originalNotRelevantText, entity.NotRelevantComments, + "To create stable binary representations/fingerprints, it's really important that strings are not shared."); + Assert.AreEqual(failureMechanism.NotRelevantComments.Comments, entity.NotRelevantComments); } [Test]