Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/IFailureMechanismCreateExtensions.cs =================================================================== diff -u -r1a062846c75d2d86454dc052adc7a5993b79963e -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/IFailureMechanismCreateExtensions.cs (.../IFailureMechanismCreateExtensions.cs) (revision 1a062846c75d2d86454dc052adc7a5993b79963e) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/IFailureMechanismCreateExtensions.cs (.../IFailureMechanismCreateExtensions.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -50,7 +50,9 @@ { FailureMechanismType = (short) type, IsRelevant = Convert.ToByte(mechanism.IsRelevant), - Comments = mechanism.Comments.DeepClone() + InputComments = mechanism.InputComments.Comments.DeepClone(), + OutputComments = mechanism.OutputComments.Comments.DeepClone(), + NotRelevantComments = mechanism.NotRelevantComments.Comments.DeepClone() }; mechanism.AddEntitiesForFailureMechanismSections(registry, entity); Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/DatabaseStructure.sql =================================================================== diff -u -re38a7c2baca2872af6319d535c6468133ea31fbc -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/DatabaseStructure.sql (.../DatabaseStructure.sql) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/DatabaseStructure.sql (.../DatabaseStructure.sql) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -1,6 +1,6 @@ /* ---------------------------------------------------- */ /* Generated by Enterprise Architect Version 12.0 */ -/* Created On : 17-nov-2016 11:31:00 */ +/* Created On : 21-Nov-2016 3:12:00 PM */ /* DBMS : SQLite */ /* ---------------------------------------------------- */ @@ -320,7 +320,9 @@ 'CalculationGroupEntityId' INTEGER, 'FailureMechanismType' SMALLINT NOT NULL, -- Enumerator for different failure mechanism types (piping, macrostability, dunes, etc) 1 = Piping 2 = Macrostabiliteit binnenwaarts 3= Golfklappen op asfaltbekleding 4= Grasbekleding erosie buitentalud 5 = Grasbekleding afschuiven buitentalud 6 = Grasbekleding erosie kruin en binnentalud 7 = Stabiliteit steenzetting 8 = Duinafslag 9 = Hoogte kunstwerk 10 = Betrouwbaarheid sluiten kunstwerk 11 = Piping bij kunstwerk 12 = Sterkte en stabiliteit puntconstructires 13 = Macrostabiliteit buitenwaarts 14 = Microstabiliteit 15 = Wateroverdruk bij asfaltbekleding 16 = Grasbekleding afschuiven binnentalud 17 = Sterkte en stabiliteit langsconstructires 18 = Technische innovaties 'IsRelevant' TINYINT (1) NOT NULL, -- true or false - 'Comments' TEXT, + 'InputComments' TEXT, + 'OutputComments' TEXT, + 'NotRelevantComments' TEXT, CONSTRAINT 'FK_FailureMechanismEntity_AssessmentSectionEntity' FOREIGN KEY ('AssessmentSectionEntityId') REFERENCES 'AssessmentSectionEntity' ('AssessmentSectionEntityId') ON DELETE Cascade ON UPDATE Cascade, CONSTRAINT 'FK_FailureMechanismEntity_CalculationGroupEntity' FOREIGN KEY ('CalculationGroupEntityId') REFERENCES 'CalculationGroupEntity' ('CalculationGroupEntityId') ON DELETE Cascade ON UPDATE Cascade, CONSTRAINT 'UI_AssessmentSectionEntityId_FailureMechanismType' UNIQUE ('AssessmentSectionEntityId','FailureMechanismType') Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/FailureMechanismEntity.cs =================================================================== diff -u -r2c4c587a6116234a66e22bdd2634ba815f7f09e4 -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/FailureMechanismEntity.cs (.../FailureMechanismEntity.cs) (revision 2c4c587a6116234a66e22bdd2634ba815f7f09e4) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/FailureMechanismEntity.cs (.../FailureMechanismEntity.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -61,7 +61,9 @@ public Nullable CalculationGroupEntityId { get; set; } public short FailureMechanismType { get; set; } public byte IsRelevant { get; set; } - public string Comments { get; set; } + public string InputComments { get; set; } + public string OutputComments { get; set; } + public string NotRelevantComments { get; set; } public virtual AssessmentSectionEntity AssessmentSectionEntity { get; set; } public virtual CalculationGroupEntity CalculationGroupEntity { get; set; } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx =================================================================== diff -u -re38a7c2baca2872af6319d535c6468133ea31fbc -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx (.../RingtoetsEntities.edmx) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx (.../RingtoetsEntities.edmx) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -4,7 +4,7 @@ - + @@ -192,7 +192,9 @@ - + + + @@ -2936,7 +2938,9 @@ - + + + @@ -5004,7 +5008,9 @@ - + + + Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx.diagram =================================================================== diff -u -re38a7c2baca2872af6319d535c6468133ea31fbc -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx.diagram (.../RingtoetsEntities.edmx.diagram) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx.diagram (.../RingtoetsEntities.edmx.diagram) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -6,65 +6,65 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + + + Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismEntityReadExtensions.cs =================================================================== diff -u -r6e33ada58f1a53a5a732c3b4e46583ad846a2983 -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismEntityReadExtensions.cs (.../FailureMechanismEntityReadExtensions.cs) (revision 6e33ada58f1a53a5a732c3b4e46583ad846a2983) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismEntityReadExtensions.cs (.../FailureMechanismEntityReadExtensions.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -67,7 +67,9 @@ ReadConversionCollector collector) { failureMechanism.IsRelevant = Convert.ToBoolean(entity.IsRelevant); - failureMechanism.Comments = entity.Comments; + failureMechanism.InputComments.Comments = entity.InputComments; + failureMechanism.OutputComments.Comments = entity.OutputComments; + failureMechanism.NotRelevantComments.Comments = entity.NotRelevantComments; entity.ReadFailureMechanismSections(failureMechanism, collector); } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ClosingStructures/ClosingStructuresFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -r98f01944e8ac182e2a1e9b1ed4deb48a07952529 -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ClosingStructures/ClosingStructuresFailureMechanismCreateExtensionsTest.cs (.../ClosingStructuresFailureMechanismCreateExtensionsTest.cs) (revision 98f01944e8ac182e2a1e9b1ed4deb48a07952529) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ClosingStructures/ClosingStructuresFailureMechanismCreateExtensionsTest.cs (.../ClosingStructuresFailureMechanismCreateExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -60,7 +60,18 @@ var failureMechanism = new ClosingStructuresFailureMechanism { IsRelevant = isRelevant, - Comments = "Some text", + InputComments = + { + Comments = "Some input text" + }, + OutputComments = + { + Comments = "Some output text" + }, + NotRelevantComments = + { + Comments = "Really not relevant" + }, GeneralInput = { N2A = 5 @@ -75,7 +86,9 @@ Assert.IsNotNull(entity); Assert.AreEqual((short) FailureMechanismType.ReliabilityClosingOfStructure, 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); ClosingStructureFailureMechanismMetaEntity metaEntity = entity.ClosingStructureFailureMechanismMetaEntities.First(); Assert.AreEqual(failureMechanism.GeneralInput.N2A, metaEntity.N2A); @@ -85,20 +98,39 @@ public void Create_StringPropertiesDoNotShareReference() { // Setup - const string original = "Some text"; + const string originalInput = "Some input text"; + const string originalOutput = "Some output text"; + const string originalNotRelevantText = "Really not relevant"; var failureMechanism = new ClosingStructuresFailureMechanism { - Comments = original + InputComments = + { + Comments = originalInput + }, + OutputComments = + { + Comments = originalOutput + }, + NotRelevantComments = + { + Comments = originalNotRelevantText + } }; var registry = new PersistenceRegistry(); // Call var entity = failureMechanism.Create(registry); // Assert - Assert.AreNotSame(original, entity.Comments, + Assert.AreNotSame(originalInput, entity.InputComments, "To create stable binary representations/fingerprints, it's really important that strings are not shared."); - Assert.AreEqual(failureMechanism.Comments, 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] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/DuneErosion/DuneErosionFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -re42bdf3dd379c46bab9212eb7b30f4754c9bc91c -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/DuneErosion/DuneErosionFailureMechanismCreateExtensionsTest.cs (.../DuneErosionFailureMechanismCreateExtensionsTest.cs) (revision e42bdf3dd379c46bab9212eb7b30f4754c9bc91c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/DuneErosion/DuneErosionFailureMechanismCreateExtensionsTest.cs (.../DuneErosionFailureMechanismCreateExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -56,7 +56,18 @@ var failureMechanism = new DuneErosionFailureMechanism { IsRelevant = isRelevant, - Comments = "Some text" + InputComments = + { + Comments = "Some input text" + }, + OutputComments = + { + Comments = "Some output text" + }, + NotRelevantComments = + { + Comments = "Really not relevant" + } }; var registry = new PersistenceRegistry(); @@ -67,27 +78,48 @@ Assert.IsNotNull(entity); Assert.AreEqual((short) FailureMechanismType.DuneErosion, 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 = "comments"; + const string originalInput = "Some input text"; + const string originalOutput = "Some output text"; + const string originalNotRelevantText = "Really not relevant"; var failureMechanism = new DuneErosionFailureMechanism { - 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(failureMechanism.Comments, 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] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -rd3eaf9dfba5fcc97f9a4b2e901e37ea83387bac2 -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs (.../GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs) (revision d3eaf9dfba5fcc97f9a4b2e901e37ea83387bac2) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs (.../GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -59,7 +59,18 @@ var failureMechanism = new GrassCoverErosionInwardsFailureMechanism { IsRelevant = isRelevant, - Comments = "Some text", + InputComments = + { + Comments = "Some input text" + }, + OutputComments = + { + Comments = "Some output text" + }, + NotRelevantComments = + { + Comments = "Really not relevant" + }, GeneralInput = { N = 12 @@ -74,7 +85,9 @@ Assert.IsNotNull(entity); Assert.AreEqual((short) FailureMechanismType.GrassRevetmentTopErosionAndInwards, 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); Assert.AreEqual(1, entity.GrassCoverErosionInwardsFailureMechanismMetaEntities.Count); GrassCoverErosionInwardsFailureMechanismMetaEntity generalInputEntity = entity.GrassCoverErosionInwardsFailureMechanismMetaEntities.First(); @@ -85,20 +98,39 @@ 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 GrassCoverErosionInwardsFailureMechanism { - 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] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionOutwards/GrassCoverErosionOutwardsFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -r98f01944e8ac182e2a1e9b1ed4deb48a07952529 -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionOutwards/GrassCoverErosionOutwardsFailureMechanismCreateExtensionsTest.cs (.../GrassCoverErosionOutwardsFailureMechanismCreateExtensionsTest.cs) (revision 98f01944e8ac182e2a1e9b1ed4deb48a07952529) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionOutwards/GrassCoverErosionOutwardsFailureMechanismCreateExtensionsTest.cs (.../GrassCoverErosionOutwardsFailureMechanismCreateExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -59,7 +59,18 @@ var failureMechanism = new GrassCoverErosionOutwardsFailureMechanism { IsRelevant = isRelevant, - Comments = "Some text" + InputComments = + { + Comments = "Some input text" + }, + OutputComments = + { + Comments = "Some output text" + }, + NotRelevantComments = + { + Comments = "Really not relevant" + } }; var registry = new PersistenceRegistry(); @@ -70,27 +81,48 @@ Assert.IsNotNull(entity); Assert.AreEqual((short) FailureMechanismType.GrassRevetmentErosionOutwards, 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 GrassCoverErosionOutwardsFailureMechanism { - 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] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverSlipOffInwards/GrassCoverSlipOffInwardsFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -re42bdf3dd379c46bab9212eb7b30f4754c9bc91c -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverSlipOffInwards/GrassCoverSlipOffInwardsFailureMechanismCreateExtensionsTest.cs (.../GrassCoverSlipOffInwardsFailureMechanismCreateExtensionsTest.cs) (revision e42bdf3dd379c46bab9212eb7b30f4754c9bc91c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverSlipOffInwards/GrassCoverSlipOffInwardsFailureMechanismCreateExtensionsTest.cs (.../GrassCoverSlipOffInwardsFailureMechanismCreateExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -56,7 +56,18 @@ var failureMechanism = new GrassCoverSlipOffInwardsFailureMechanism { IsRelevant = isRelevant, - Comments = "Some text" + InputComments = + { + Comments = "Some input text" + }, + OutputComments = + { + Comments = "Some output text" + }, + NotRelevantComments = + { + Comments = "Really not relevant" + } }; var registry = new PersistenceRegistry(); @@ -67,27 +78,48 @@ Assert.IsNotNull(entity); Assert.AreEqual((short) FailureMechanismType.GrassRevetmentSlidingInwards, 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 GrassCoverSlipOffInwardsFailureMechanism { - Comments = originalComments + InputComments = + { + Comments = originalInput + }, + OutputComments = + { + Comments = originalOutput + }, + NotRelevantComments = + { + Comments = originalNotRelevantText + } }; var registry = new PersistenceRegistry(); // Call var 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] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverSlipOffOutwards/GrassCoverSlipOffOutwardsFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -re42bdf3dd379c46bab9212eb7b30f4754c9bc91c -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverSlipOffOutwards/GrassCoverSlipOffOutwardsFailureMechanismCreateExtensionsTest.cs (.../GrassCoverSlipOffOutwardsFailureMechanismCreateExtensionsTest.cs) (revision e42bdf3dd379c46bab9212eb7b30f4754c9bc91c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverSlipOffOutwards/GrassCoverSlipOffOutwardsFailureMechanismCreateExtensionsTest.cs (.../GrassCoverSlipOffOutwardsFailureMechanismCreateExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -56,7 +56,18 @@ var failureMechanism = new GrassCoverSlipOffOutwardsFailureMechanism { IsRelevant = isRelevant, - Comments = "Some text" + InputComments = + { + Comments = "Some input text" + }, + OutputComments = + { + Comments = "Some output text" + }, + NotRelevantComments = + { + Comments = "Really not relevant" + } }; var registry = new PersistenceRegistry(); @@ -67,27 +78,48 @@ Assert.IsNotNull(entity); Assert.AreEqual((short) FailureMechanismType.GrassRevetmentSlidingOutwards, 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 GrassCoverSlipOffOutwardsFailureMechanism { - 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] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HeightStructures/HeightStructuresFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -r98f01944e8ac182e2a1e9b1ed4deb48a07952529 -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HeightStructures/HeightStructuresFailureMechanismCreateExtensionsTest.cs (.../HeightStructuresFailureMechanismCreateExtensionsTest.cs) (revision 98f01944e8ac182e2a1e9b1ed4deb48a07952529) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HeightStructures/HeightStructuresFailureMechanismCreateExtensionsTest.cs (.../HeightStructuresFailureMechanismCreateExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -59,7 +59,18 @@ var failureMechanism = new HeightStructuresFailureMechanism { IsRelevant = isRelevant, - Comments = "Some text", + InputComments = + { + Comments = "Some input text" + }, + OutputComments = + { + Comments = "Some output text" + }, + NotRelevantComments = + { + Comments = "Really not relevant" + }, GeneralInput = { N = 7 @@ -74,7 +85,9 @@ Assert.IsNotNull(entity); Assert.AreEqual((short) FailureMechanismType.StructureHeight, 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); HeightStructuresFailureMechanismMetaEntity metaEntity = entity.HeightStructuresFailureMechanismMetaEntities.First(); Assert.AreEqual(failureMechanism.GeneralInput.N, metaEntity.N); @@ -84,20 +97,39 @@ 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 HeightStructuresFailureMechanism { - Comments = originalComments + InputComments = + { + Comments = originalInput + }, + OutputComments = + { + Comments = originalOutput + }, + NotRelevantComments = + { + Comments = originalNotRelevantText + } }; var registry = new PersistenceRegistry(); // Call var 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] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/IFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -re42bdf3dd379c46bab9212eb7b30f4754c9bc91c -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/IFailureMechanismCreateExtensionsTest.cs (.../IFailureMechanismCreateExtensionsTest.cs) (revision e42bdf3dd379c46bab9212eb7b30f4754c9bc91c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/IFailureMechanismCreateExtensionsTest.cs (.../IFailureMechanismCreateExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -93,19 +93,29 @@ public void Create_StringPropertiesDoNotShareReference() { // Setup - const string original = "ladida"; + const string originalInput = "Some input text"; + const string originalOutput = "Some output text"; + const string originalNotRelevantText = "Really not relevant"; IFailureMechanism failureMechanism = new TestFailureMechanism("a", "cool"); - failureMechanism.Comments = original; + failureMechanism.InputComments.Comments = originalInput; + failureMechanism.OutputComments.Comments = originalOutput; + failureMechanism.NotRelevantComments.Comments = originalNotRelevantText; var registry = new PersistenceRegistry(); // Call FailureMechanismEntity entity = failureMechanism.Create(FailureMechanismType.DuneErosion, registry); // Assert - Assert.AreNotSame(original, entity.Comments, + Assert.AreNotSame(originalInput, entity.InputComments, "To create stable binary representations/fingerprints, it's really important that strings are not shared."); - Assert.AreEqual(original, 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); } } } \ No newline at end of file Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacrostabilityInwards/MacrostabilityInwardsFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -re42bdf3dd379c46bab9212eb7b30f4754c9bc91c -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacrostabilityInwards/MacrostabilityInwardsFailureMechanismCreateExtensionsTest.cs (.../MacrostabilityInwardsFailureMechanismCreateExtensionsTest.cs) (revision e42bdf3dd379c46bab9212eb7b30f4754c9bc91c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacrostabilityInwards/MacrostabilityInwardsFailureMechanismCreateExtensionsTest.cs (.../MacrostabilityInwardsFailureMechanismCreateExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -56,7 +56,18 @@ var failureMechanism = new MacrostabilityInwardsFailureMechanism { IsRelevant = isRelevant, - Comments = "Some text" + InputComments = + { + Comments = "Some input text" + }, + OutputComments = + { + Comments = "Some output text" + }, + NotRelevantComments = + { + Comments = "Really not relevant" + } }; var registry = new PersistenceRegistry(); @@ -67,27 +78,48 @@ Assert.IsNotNull(entity); Assert.AreEqual((short) FailureMechanismType.MacrostabilityInwards, 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 MacrostabilityInwardsFailureMechanism { - 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] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacrostabilityOutwards/MacrostabilityOutwardsFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -re42bdf3dd379c46bab9212eb7b30f4754c9bc91c -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacrostabilityOutwards/MacrostabilityOutwardsFailureMechanismCreateExtensionsTest.cs (.../MacrostabilityOutwardsFailureMechanismCreateExtensionsTest.cs) (revision e42bdf3dd379c46bab9212eb7b30f4754c9bc91c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacrostabilityOutwards/MacrostabilityOutwardsFailureMechanismCreateExtensionsTest.cs (.../MacrostabilityOutwardsFailureMechanismCreateExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -56,7 +56,18 @@ var failureMechanism = new MacrostabilityOutwardsFailureMechanism { IsRelevant = isRelevant, - Comments = "Some text" + InputComments = + { + Comments = "Some input text" + }, + OutputComments = + { + Comments = "Some output text" + }, + NotRelevantComments = + { + Comments = "Really not relevant" + } }; var registry = new PersistenceRegistry(); @@ -67,27 +78,48 @@ Assert.IsNotNull(entity); Assert.AreEqual((short) FailureMechanismType.MacrostabilityOutwards, 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 MacrostabilityOutwardsFailureMechanism { - 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] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Microstability/MicrostabilityFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -re42bdf3dd379c46bab9212eb7b30f4754c9bc91c -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Microstability/MicrostabilityFailureMechanismCreateExtensionsTest.cs (.../MicrostabilityFailureMechanismCreateExtensionsTest.cs) (revision e42bdf3dd379c46bab9212eb7b30f4754c9bc91c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Microstability/MicrostabilityFailureMechanismCreateExtensionsTest.cs (.../MicrostabilityFailureMechanismCreateExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -56,7 +56,18 @@ var failureMechanism = new MicrostabilityFailureMechanism { IsRelevant = isRelevant, - Comments = "Some text" + InputComments = + { + Comments = "Some input text" + }, + OutputComments = + { + Comments = "Some output text" + }, + NotRelevantComments = + { + Comments = "Really not relevant" + } }; var registry = new PersistenceRegistry(); @@ -67,27 +78,48 @@ Assert.IsNotNull(entity); Assert.AreEqual((short) FailureMechanismType.Microstability, 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 MicrostabilityFailureMechanism { - 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] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -rd3eaf9dfba5fcc97f9a4b2e901e37ea83387bac2 -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingFailureMechanismCreateExtensionsTest.cs (.../PipingFailureMechanismCreateExtensionsTest.cs) (revision d3eaf9dfba5fcc97f9a4b2e901e37ea83387bac2) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingFailureMechanismCreateExtensionsTest.cs (.../PipingFailureMechanismCreateExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -59,7 +59,18 @@ var failureMechanism = new PipingFailureMechanism { IsRelevant = isRelevant, - Comments = "Some text", + InputComments = + { + Comments = "Some input text" + }, + OutputComments = + { + Comments = "Some output text" + }, + NotRelevantComments = + { + Comments = "Really not relevant" + }, PipingProbabilityAssessmentInput = { A = 0.9876 @@ -74,7 +85,9 @@ Assert.IsNotNull(entity); Assert.AreEqual((short) FailureMechanismType.Piping, 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); CollectionAssert.IsEmpty(entity.StochasticSoilModelEntities); var failureMechanismMetaEntity = entity.PipingFailureMechanismMetaEntities.ToArray()[0]; @@ -85,20 +98,39 @@ 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 PipingFailureMechanism { - 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] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PipingStructure/PipingStructureFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -re42bdf3dd379c46bab9212eb7b30f4754c9bc91c -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PipingStructure/PipingStructureFailureMechanismCreateExtensionsTest.cs (.../PipingStructureFailureMechanismCreateExtensionsTest.cs) (revision e42bdf3dd379c46bab9212eb7b30f4754c9bc91c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PipingStructure/PipingStructureFailureMechanismCreateExtensionsTest.cs (.../PipingStructureFailureMechanismCreateExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -56,7 +56,18 @@ var failureMechanism = new PipingStructureFailureMechanism { IsRelevant = isRelevant, - Comments = "Some text" + InputComments = + { + Comments = "Some input text" + }, + OutputComments = + { + Comments = "Some output text" + }, + NotRelevantComments = + { + Comments = "Really not relevant" + } }; var registry = new PersistenceRegistry(); @@ -67,27 +78,48 @@ Assert.IsNotNull(entity); Assert.AreEqual((short) FailureMechanismType.PipingAtStructure, 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 PipingStructureFailureMechanism { - 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] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -r98f01944e8ac182e2a1e9b1ed4deb48a07952529 -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismCreateExtensionsTest.cs (.../StabilityPointStructuresFailureMechanismCreateExtensionsTest.cs) (revision 98f01944e8ac182e2a1e9b1ed4deb48a07952529) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismCreateExtensionsTest.cs (.../StabilityPointStructuresFailureMechanismCreateExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -60,7 +60,18 @@ var failureMechanism = new StabilityPointStructuresFailureMechanism { IsRelevant = isRelevant, - Comments = "Some text", + InputComments = + { + Comments = "Some input text" + }, + OutputComments = + { + Comments = "Some output text" + }, + NotRelevantComments = + { + Comments = "Really not relevant" + }, GeneralInput = { N = 4 @@ -75,7 +86,9 @@ Assert.IsNotNull(entity); Assert.AreEqual((short) FailureMechanismType.StabilityPointStructures, 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); var metaEntity = entity.StabilityPointStructuresFailureMechanismMetaEntities.First(); Assert.AreEqual(failureMechanism.GeneralInput.N, metaEntity.N); @@ -85,20 +98,39 @@ 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 StabilityPointStructuresFailureMechanism { - 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] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -r98f01944e8ac182e2a1e9b1ed4deb48a07952529 -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismCreateExtensionsTest.cs (.../StabilityStoneCoverFailureMechanismCreateExtensionsTest.cs) (revision 98f01944e8ac182e2a1e9b1ed4deb48a07952529) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismCreateExtensionsTest.cs (.../StabilityStoneCoverFailureMechanismCreateExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -58,7 +58,18 @@ var failureMechanism = new StabilityStoneCoverFailureMechanism { 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.StabilityStoneRevetment, 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 StabilityStoneCoverFailureMechanism { - 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] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StrengthStabilityLengthwise/StrengthStabilityLengthwiseConstructionFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -re42bdf3dd379c46bab9212eb7b30f4754c9bc91c -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StrengthStabilityLengthwise/StrengthStabilityLengthwiseConstructionFailureMechanismCreateExtensionsTest.cs (.../StrengthStabilityLengthwiseConstructionFailureMechanismCreateExtensionsTest.cs) (revision e42bdf3dd379c46bab9212eb7b30f4754c9bc91c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StrengthStabilityLengthwise/StrengthStabilityLengthwiseConstructionFailureMechanismCreateExtensionsTest.cs (.../StrengthStabilityLengthwiseConstructionFailureMechanismCreateExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -56,7 +56,18 @@ var failureMechanism = new StrengthStabilityLengthwiseConstructionFailureMechanism { IsRelevant = isRelevant, - Comments = "Some text" + InputComments = + { + Comments = "Some input text" + }, + OutputComments = + { + Comments = "Some output text" + }, + NotRelevantComments = + { + Comments = "Really not relevant" + } }; var registry = new PersistenceRegistry(); @@ -67,27 +78,48 @@ Assert.IsNotNull(entity); Assert.AreEqual((short) FailureMechanismType.StrengthAndStabilityParallelConstruction, 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 StrengthStabilityLengthwiseConstructionFailureMechanism { - 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] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/TechnicalInnovation/TechnicalInnovationFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -re42bdf3dd379c46bab9212eb7b30f4754c9bc91c -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/TechnicalInnovation/TechnicalInnovationFailureMechanismCreateExtensionsTest.cs (.../TechnicalInnovationFailureMechanismCreateExtensionsTest.cs) (revision e42bdf3dd379c46bab9212eb7b30f4754c9bc91c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/TechnicalInnovation/TechnicalInnovationFailureMechanismCreateExtensionsTest.cs (.../TechnicalInnovationFailureMechanismCreateExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -56,7 +56,18 @@ var failureMechanism = new TechnicalInnovationFailureMechanism { IsRelevant = isRelevant, - Comments = "Some text" + InputComments = + { + Comments = "Some input text" + }, + OutputComments = + { + Comments = "Some output text" + }, + NotRelevantComments = + { + Comments = "Really not relevant" + } }; var registry = new PersistenceRegistry(); @@ -67,27 +78,48 @@ Assert.IsNotNull(entity); Assert.AreEqual((short) FailureMechanismType.TechnicalInnovations, 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 TechnicalInnovationFailureMechanism { - 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] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaterPressureAsphaltCover/WaterPressureAsphaltCoverFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -re42bdf3dd379c46bab9212eb7b30f4754c9bc91c -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaterPressureAsphaltCover/WaterPressureAsphaltCoverFailureMechanismCreateExtensionsTest.cs (.../WaterPressureAsphaltCoverFailureMechanismCreateExtensionsTest.cs) (revision e42bdf3dd379c46bab9212eb7b30f4754c9bc91c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaterPressureAsphaltCover/WaterPressureAsphaltCoverFailureMechanismCreateExtensionsTest.cs (.../WaterPressureAsphaltCoverFailureMechanismCreateExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -56,7 +56,18 @@ var failureMechanism = new WaterPressureAsphaltCoverFailureMechanism { IsRelevant = isRelevant, - Comments = "Some text" + InputComments = + { + Comments = "Some input text" + }, + OutputComments = + { + Comments = "Some output text" + }, + NotRelevantComments = + { + Comments = "Really not relevant" + } }; var registry = new PersistenceRegistry(); @@ -67,27 +78,48 @@ Assert.IsNotNull(entity); Assert.AreEqual((short) FailureMechanismType.WaterOverpressureAsphaltRevetment, 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 WaterPressureAsphaltCoverFailureMechanism { - 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] 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] Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/AssessmentSectionEntityReadExtensionsTest.cs =================================================================== diff -u -r86ce17cdf5cf329f4d5bcd444320994fead52294 -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/AssessmentSectionEntityReadExtensionsTest.cs (.../AssessmentSectionEntityReadExtensionsTest.cs) (revision 86ce17cdf5cf329f4d5bcd444320994fead52294) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/AssessmentSectionEntityReadExtensionsTest.cs (.../AssessmentSectionEntityReadExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -156,20 +156,24 @@ [Test] [TestCase(true)] [TestCase(false)] - public void Read_WithPipingFailureMechnismProperties_ReturnsNewAssessmentSectionWithPropertiesInPipingFailureMechanism(bool isRelevant) + public void Read_WithPipingFailureMechanismProperties_ReturnsNewAssessmentSectionWithPropertiesInPipingFailureMechanism(bool isRelevant) { // Setup var entity = CreateAssessmentSectionEntity(); var random = new Random(21); var parameterA = random.NextDouble()/10; - const string comments = "Some text"; + const string inputComments = "Some input text"; + const string outputComments = "Some output text"; + const string notRelevantComments = "Really not relevant"; var failureMechanismEntity = new FailureMechanismEntity { FailureMechanismType = (int) FailureMechanismType.Piping, CalculationGroupEntity = new CalculationGroupEntity(), IsRelevant = Convert.ToByte(isRelevant), - Comments = comments, + InputComments = inputComments, + OutputComments = outputComments, + NotRelevantComments = notRelevantComments, PipingFailureMechanismMetaEntities = { new PipingFailureMechanismMetaEntity @@ -187,7 +191,9 @@ // Assert Assert.AreEqual(isRelevant, section.PipingFailureMechanism.IsRelevant); - Assert.AreEqual(comments, section.PipingFailureMechanism.Comments); + Assert.AreEqual(inputComments, section.PipingFailureMechanism.InputComments.Comments); + Assert.AreEqual(outputComments, section.PipingFailureMechanism.OutputComments.Comments); + Assert.AreEqual(notRelevantComments, section.PipingFailureMechanism.NotRelevantComments.Comments); Assert.AreEqual(parameterA, section.PipingFailureMechanism.PipingProbabilityAssessmentInput.A); } @@ -336,15 +342,19 @@ { // Setup var entity = CreateAssessmentSectionEntity(); - const string comments = "Some text"; + const string originalInput = "Some input text"; + const string originalOutput = "Some output text"; + const string originalNotRelevantText = "Really not relevant"; var n = new Random(21).Next(1, 20); var failureMechanismEntity = new FailureMechanismEntity { FailureMechanismType = (int) FailureMechanismType.GrassRevetmentTopErosionAndInwards, CalculationGroupEntity = new CalculationGroupEntity(), IsRelevant = Convert.ToByte(isRelevant), - Comments = comments, + InputComments = originalInput, + OutputComments = originalOutput, + NotRelevantComments = originalNotRelevantText, GrassCoverErosionInwardsFailureMechanismMetaEntities = { new GrassCoverErosionInwardsFailureMechanismMetaEntity @@ -362,7 +372,9 @@ // Assert Assert.AreEqual(isRelevant, section.GrassCoverErosionInwards.IsRelevant); - Assert.AreEqual(comments, section.GrassCoverErosionInwards.Comments); + Assert.AreEqual(originalInput, section.GrassCoverErosionInwards.InputComments.Comments); + Assert.AreEqual(originalOutput, section.GrassCoverErosionInwards.OutputComments.Comments); + Assert.AreEqual(originalNotRelevantText, section.GrassCoverErosionInwards.NotRelevantComments.Comments); Assert.AreEqual(n, section.GrassCoverErosionInwards.GeneralInput.N); } @@ -447,15 +459,19 @@ { // Setup var entity = CreateAssessmentSectionEntity(); - const string comments = "Some text"; + const string inputComments = "Some input text"; + const string outputComments = "Some output text"; + const string notRelevantComments = "Really not relevant"; int n = new Random(21).Next(1, 20); var failureMechanismEntity = new FailureMechanismEntity { FailureMechanismType = (int) FailureMechanismType.GrassRevetmentErosionOutwards, CalculationGroupEntity = new CalculationGroupEntity(), IsRelevant = Convert.ToByte(isRelevant), - Comments = comments, + InputComments = inputComments, + OutputComments = outputComments, + NotRelevantComments = notRelevantComments, GrassCoverErosionOutwardsFailureMechanismMetaEntities = { new GrassCoverErosionOutwardsFailureMechanismMetaEntity @@ -473,7 +489,9 @@ // Assert Assert.AreEqual(isRelevant, section.GrassCoverErosionOutwards.IsRelevant); - Assert.AreEqual(comments, section.GrassCoverErosionOutwards.Comments); + Assert.AreEqual(inputComments, section.GrassCoverErosionOutwards.InputComments.Comments); + Assert.AreEqual(outputComments, section.GrassCoverErosionOutwards.OutputComments.Comments); + Assert.AreEqual(notRelevantComments, section.GrassCoverErosionOutwards.NotRelevantComments.Comments); Assert.AreEqual(n, section.GrassCoverErosionOutwards.GeneralInput.N); } @@ -578,14 +596,18 @@ { // Setup var entity = CreateAssessmentSectionEntity(); - const string comments = "Some text"; + const string inputComments = "Some input text"; + const string outputComments = "Some output text"; + const string notRelevantComments = "Really not relevant"; var failureMechanismEntity = new FailureMechanismEntity { FailureMechanismType = (int) FailureMechanismType.StabilityStoneRevetment, CalculationGroupEntity = new CalculationGroupEntity(), IsRelevant = Convert.ToByte(isRelevant), - Comments = comments + InputComments = inputComments, + OutputComments = outputComments, + NotRelevantComments = notRelevantComments }; entity.FailureMechanismEntities.Add(failureMechanismEntity); @@ -596,7 +618,9 @@ // Assert Assert.AreEqual(isRelevant, section.StabilityStoneCover.IsRelevant); - Assert.AreEqual(comments, section.StabilityStoneCover.Comments); + Assert.AreEqual(inputComments, section.StabilityStoneCover.InputComments.Comments); + Assert.AreEqual(outputComments, section.StabilityStoneCover.OutputComments.Comments); + Assert.AreEqual(notRelevantComments, section.StabilityStoneCover.NotRelevantComments.Comments); } [Test] @@ -689,14 +713,18 @@ { // Setup var entity = CreateAssessmentSectionEntity(); - const string comments = "Some text"; + const string inputComments = "Some input text"; + const string outputComments = "Some output text"; + const string notRelevantComments = "Really not relevant"; var failureMechanismEntity = new FailureMechanismEntity { FailureMechanismType = (int) FailureMechanismType.WaveImpactOnAsphaltRevetment, CalculationGroupEntity = new CalculationGroupEntity(), IsRelevant = Convert.ToByte(isRelevant), - Comments = comments + InputComments = inputComments, + OutputComments = outputComments, + NotRelevantComments = notRelevantComments }; entity.FailureMechanismEntities.Add(failureMechanismEntity); @@ -707,7 +735,9 @@ // Assert Assert.AreEqual(isRelevant, section.WaveImpactAsphaltCover.IsRelevant); - Assert.AreEqual(comments, section.WaveImpactAsphaltCover.Comments); + Assert.AreEqual(inputComments, section.WaveImpactAsphaltCover.InputComments.Comments); + Assert.AreEqual(outputComments, section.WaveImpactAsphaltCover.OutputComments.Comments); + Assert.AreEqual(notRelevantComments, section.WaveImpactAsphaltCover.NotRelevantComments.Comments); } [Test] @@ -797,14 +827,18 @@ { // Setup AssessmentSectionEntity entity = CreateAssessmentSectionEntity(); - const string comments = "Some text"; + const string inputComments = "Some input text"; + const string outputComments = "Some output text"; + const string notRelevantComments = "Really not relevant"; var failureMechanismEntity = new FailureMechanismEntity { FailureMechanismType = (int) FailureMechanismType.StructureHeight, CalculationGroupEntity = new CalculationGroupEntity(), IsRelevant = Convert.ToByte(isRelevant), - Comments = comments, + InputComments = inputComments, + OutputComments = outputComments, + NotRelevantComments = notRelevantComments, HeightStructuresFailureMechanismMetaEntities = { new HeightStructuresFailureMechanismMetaEntity @@ -822,7 +856,9 @@ // Assert Assert.AreEqual(isRelevant, section.HeightStructures.IsRelevant); - Assert.AreEqual(comments, section.HeightStructures.Comments); + Assert.AreEqual(inputComments, section.HeightStructures.InputComments.Comments); + Assert.AreEqual(outputComments, section.HeightStructures.OutputComments.Comments); + Assert.AreEqual(notRelevantComments, section.HeightStructures.NotRelevantComments.Comments); } [Test] @@ -832,14 +868,18 @@ { // Setup AssessmentSectionEntity entity = CreateAssessmentSectionEntity(); - const string comments = "Some text"; + const string inputComments = "Some input text"; + const string outputComments = "Some output text"; + const string notRelevantComments = "Really not relevant"; var failureMechanismEntity = new FailureMechanismEntity { FailureMechanismType = (int) FailureMechanismType.ReliabilityClosingOfStructure, CalculationGroupEntity = new CalculationGroupEntity(), IsRelevant = Convert.ToByte(isRelevant), - Comments = comments, + InputComments = inputComments, + OutputComments = outputComments, + NotRelevantComments = notRelevantComments, ClosingStructureFailureMechanismMetaEntities = { new ClosingStructureFailureMechanismMetaEntity @@ -857,7 +897,9 @@ // Assert Assert.AreEqual(isRelevant, section.ClosingStructures.IsRelevant); - Assert.AreEqual(comments, section.ClosingStructures.Comments); + Assert.AreEqual(inputComments, section.ClosingStructures.InputComments.Comments); + Assert.AreEqual(outputComments, section.ClosingStructures.OutputComments.Comments); + Assert.AreEqual(notRelevantComments, section.ClosingStructures.NotRelevantComments.Comments); } [Test] @@ -867,14 +909,18 @@ { // Setup AssessmentSectionEntity entity = CreateAssessmentSectionEntity(); - const string comments = "Some text"; + const string inputComments = "Some input text"; + const string outputComments = "Some output text"; + const string notRelevantComments = "Really not relevant"; var failureMechanismEntity = new FailureMechanismEntity { FailureMechanismType = (int) FailureMechanismType.StabilityPointStructures, CalculationGroupEntity = new CalculationGroupEntity(), IsRelevant = Convert.ToByte(isRelevant), - Comments = comments, + InputComments = inputComments, + OutputComments = outputComments, + NotRelevantComments = notRelevantComments, StabilityPointStructuresFailureMechanismMetaEntities = { new StabilityPointStructuresFailureMechanismMetaEntity @@ -892,7 +938,9 @@ // Assert Assert.AreEqual(isRelevant, section.StabilityPointStructures.IsRelevant); - Assert.AreEqual(comments, section.StabilityPointStructures.Comments); + Assert.AreEqual(inputComments, section.StabilityPointStructures.InputComments.Comments); + Assert.AreEqual(outputComments, section.StabilityPointStructures.OutputComments.Comments); + Assert.AreEqual(notRelevantComments, section.StabilityPointStructures.NotRelevantComments.Comments); } [Test] @@ -902,41 +950,66 @@ { // Setup var entity = CreateAssessmentSectionEntity(); - var macrostabilityInwardsEntityComment = "2"; - var macrostabilityOutwardsEntityComment = "3"; - var microstabilityEntityComment = "4"; - var failingOfConstructionLengthwiseEntityComment = "23"; - var waterPressureEntityComment = "78"; - var grassCoverSlipoffOutwardsEntityComment = "134"; - var grassCoverSlipoffInwardsEntityComment = "135"; - var duneErosionEntityComment = "256"; - var technicalInnovationsEntityComment = "257"; - entity.FailureMechanismEntities.Add(CreateFailureMechanismEntity(isRelevant, macrostabilityInwardsEntityComment, FailureMechanismType.MacrostabilityInwards)); - entity.FailureMechanismEntities.Add(CreateFailureMechanismEntity(isRelevant, macrostabilityOutwardsEntityComment, FailureMechanismType.MacrostabilityOutwards)); - entity.FailureMechanismEntities.Add(CreateFailureMechanismEntity(isRelevant, microstabilityEntityComment, FailureMechanismType.Microstability)); - entity.FailureMechanismEntities.Add(CreateFailureMechanismEntity(isRelevant, failingOfConstructionLengthwiseEntityComment, FailureMechanismType.StrengthAndStabilityParallelConstruction)); - entity.FailureMechanismEntities.Add(CreateFailureMechanismEntity(isRelevant, waterPressureEntityComment, FailureMechanismType.WaterOverpressureAsphaltRevetment)); - entity.FailureMechanismEntities.Add(CreateFailureMechanismEntity(isRelevant, grassCoverSlipoffOutwardsEntityComment, FailureMechanismType.GrassRevetmentSlidingOutwards)); - entity.FailureMechanismEntities.Add(CreateFailureMechanismEntity(isRelevant, grassCoverSlipoffInwardsEntityComment, FailureMechanismType.GrassRevetmentSlidingInwards)); - entity.FailureMechanismEntities.Add(CreateFailureMechanismEntity(isRelevant, duneErosionEntityComment, FailureMechanismType.DuneErosion)); - entity.FailureMechanismEntities.Add(CreateFailureMechanismEntity(isRelevant, technicalInnovationsEntityComment, FailureMechanismType.TechnicalInnovations)); + FailureMechanismEntity macrostabilityInwards = CreateFailureMechanismEntity( + isRelevant, FailureMechanismType.MacrostabilityInwards); + FailureMechanismEntity macrostabilityOutwards = CreateFailureMechanismEntity( + isRelevant, FailureMechanismType.MacrostabilityOutwards); + FailureMechanismEntity microstability = CreateFailureMechanismEntity( + isRelevant, FailureMechanismType.Microstability); + FailureMechanismEntity strengthAndStabilityParallelConstruction = CreateFailureMechanismEntity( + isRelevant, FailureMechanismType.StrengthAndStabilityParallelConstruction); + FailureMechanismEntity waterOverpressureAsphaltRevetment = CreateFailureMechanismEntity( + isRelevant, FailureMechanismType.WaterOverpressureAsphaltRevetment); + FailureMechanismEntity grassRevetmentSlidingOutwards = CreateFailureMechanismEntity( + isRelevant, FailureMechanismType.GrassRevetmentSlidingOutwards); + FailureMechanismEntity grassRevetmentSlidingInwards = CreateFailureMechanismEntity( + isRelevant, FailureMechanismType.GrassRevetmentSlidingInwards); + FailureMechanismEntity duneErosion = CreateFailureMechanismEntity( + isRelevant, FailureMechanismType.DuneErosion); + FailureMechanismEntity technicalInnovations = CreateFailureMechanismEntity( + isRelevant, FailureMechanismType.TechnicalInnovations); + entity.FailureMechanismEntities.Add(macrostabilityInwards); + entity.FailureMechanismEntities.Add(macrostabilityOutwards); + entity.FailureMechanismEntities.Add(microstability); + entity.FailureMechanismEntities.Add(strengthAndStabilityParallelConstruction); + entity.FailureMechanismEntities.Add(waterOverpressureAsphaltRevetment); + entity.FailureMechanismEntities.Add(grassRevetmentSlidingOutwards); + entity.FailureMechanismEntities.Add(grassRevetmentSlidingInwards); + entity.FailureMechanismEntities.Add(duneErosion); + entity.FailureMechanismEntities.Add(technicalInnovations); + var collector = new ReadConversionCollector(); // Call var section = entity.Read(collector); // Assert - AssertFailureMechanismEqual(isRelevant, macrostabilityInwardsEntityComment, 2, section.MacrostabilityInwards); - AssertFailureMechanismEqual(isRelevant, macrostabilityOutwardsEntityComment, 2, section.MacrostabilityOutwards); - AssertFailureMechanismEqual(isRelevant, microstabilityEntityComment, 2, section.Microstability); - AssertFailureMechanismEqual(isRelevant, failingOfConstructionLengthwiseEntityComment, 2, section.StrengthStabilityLengthwiseConstruction); - AssertFailureMechanismEqual(isRelevant, waterPressureEntityComment, 2, section.WaterPressureAsphaltCover); - AssertFailureMechanismEqual(isRelevant, grassCoverSlipoffOutwardsEntityComment, 2, section.GrassCoverSlipOffOutwards); - AssertFailureMechanismEqual(isRelevant, grassCoverSlipoffInwardsEntityComment, 2, section.GrassCoverSlipOffInwards); - AssertFailureMechanismEqual(isRelevant, duneErosionEntityComment, 2, section.DuneErosion); - AssertFailureMechanismEqual(isRelevant, technicalInnovationsEntityComment, 2, section.TechnicalInnovation); + AssertFailureMechanismEqual(isRelevant, 2, macrostabilityInwards.InputComments, + macrostabilityInwards.OutputComments, macrostabilityInwards.NotRelevantComments, + section.MacrostabilityInwards); + AssertFailureMechanismEqual(isRelevant, 2, macrostabilityOutwards.InputComments, + macrostabilityOutwards.OutputComments, macrostabilityOutwards.NotRelevantComments, + section.MacrostabilityOutwards); + AssertFailureMechanismEqual(isRelevant, 2, microstability.InputComments, + microstability.OutputComments, microstability.NotRelevantComments, section.Microstability); + AssertFailureMechanismEqual(isRelevant, 2, strengthAndStabilityParallelConstruction.InputComments, + strengthAndStabilityParallelConstruction.OutputComments, + strengthAndStabilityParallelConstruction.NotRelevantComments, + section.StrengthStabilityLengthwiseConstruction); + AssertFailureMechanismEqual(isRelevant, 2, waterOverpressureAsphaltRevetment.InputComments, + waterOverpressureAsphaltRevetment.OutputComments, + waterOverpressureAsphaltRevetment.NotRelevantComments, + section.WaterPressureAsphaltCover); + AssertFailureMechanismEqual(isRelevant, 2, grassRevetmentSlidingOutwards.InputComments, + grassRevetmentSlidingOutwards.OutputComments, grassRevetmentSlidingOutwards.NotRelevantComments, + section.GrassCoverSlipOffOutwards); + AssertFailureMechanismEqual(isRelevant, 2, duneErosion.InputComments, duneErosion.OutputComments, + duneErosion.NotRelevantComments, section.DuneErosion); + AssertFailureMechanismEqual(isRelevant, 2, technicalInnovations.InputComments, + technicalInnovations.OutputComments, technicalInnovations.NotRelevantComments, + section.TechnicalInnovation); } private static AssessmentSectionEntity CreateAssessmentSectionEntity() @@ -947,22 +1020,28 @@ }; } - private static FailureMechanismEntity CreateFailureMechanismEntity(bool isRelevant, string comment, FailureMechanismType failureMechanismType) + private static FailureMechanismEntity CreateFailureMechanismEntity(bool isRelevant, + FailureMechanismType failureMechanismType) { return new FailureMechanismEntity { FailureMechanismType = (short) failureMechanismType, IsRelevant = Convert.ToByte(isRelevant), - Comments = comment, + InputComments = string.Concat("InputComment", failureMechanismType.ToString()), + OutputComments = string.Concat("OutputComment", failureMechanismType.ToString()), + NotRelevantComments = string.Concat("NotRelevantComment", failureMechanismType.ToString()), FailureMechanismSectionEntities = CreateFailureMechanismSectionEntities() }; } - private static void AssertFailureMechanismEqual(bool expectedIsRelevant, string expectedComments, - int expectedSectionCount, IFailureMechanism failureMechanism) + private static void AssertFailureMechanismEqual(bool expectedIsRelevant, int expectedSectionCount, + string expectedInputComments, string expectedOutputComments, + string expectedNotRelevantComments, IFailureMechanism failureMechanism) { Assert.AreEqual(expectedIsRelevant, failureMechanism.IsRelevant); - Assert.AreEqual(expectedComments, failureMechanism.Comments); + Assert.AreEqual(expectedInputComments, failureMechanism.InputComments.Comments); + Assert.AreEqual(expectedOutputComments, failureMechanism.OutputComments.Comments); + Assert.AreEqual(expectedNotRelevantComments, failureMechanism.NotRelevantComments.Comments); Assert.AreEqual(expectedSectionCount, failureMechanism.Sections.Count()); } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/FailureMechanismEntityReadExtensionsTest.cs =================================================================== diff -u -r3e7db9d95e07d438ec99f8488ec184848655b98c -r8e310b99d8873ca1a46282c54302acb1d1678dab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/FailureMechanismEntityReadExtensionsTest.cs (.../FailureMechanismEntityReadExtensionsTest.cs) (revision 3e7db9d95e07d438ec99f8488ec184848655b98c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/FailureMechanismEntityReadExtensionsTest.cs (.../FailureMechanismEntityReadExtensionsTest.cs) (revision 8e310b99d8873ca1a46282c54302acb1d1678dab) @@ -53,7 +53,9 @@ var entity = new FailureMechanismEntity { IsRelevant = Convert.ToByte(isRelevant), - Comments = "Some comment" + InputComments = "Some input text", + OutputComments = "Some output text", + NotRelevantComments = "Really not relevant" }; var collector = new ReadConversionCollector(); var failureMechanism = new TestFailureMechanism(); @@ -64,7 +66,9 @@ // Assert Assert.IsEmpty(failureMechanism.Sections); Assert.AreEqual(isRelevant, failureMechanism.IsRelevant); - Assert.AreEqual(entity.Comments, failureMechanism.Comments); + Assert.AreEqual(entity.InputComments, failureMechanism.InputComments.Comments); + Assert.AreEqual(entity.OutputComments, failureMechanism.OutputComments.Comments); + Assert.AreEqual(entity.NotRelevantComments, failureMechanism.NotRelevantComments.Comments); Assert.IsEmpty(failureMechanism.Sections); } @@ -143,7 +147,9 @@ var entity = new FailureMechanismEntity { IsRelevant = Convert.ToByte(isRelevant), - Comments = "Some comment", + InputComments = "Some input text", + OutputComments = "Some output text", + NotRelevantComments = "Really not relevant", CalculationGroupEntity = new CalculationGroupEntity(), PipingFailureMechanismMetaEntities = new[] { @@ -162,7 +168,9 @@ // Assert Assert.IsNotNull(failureMechanism); Assert.AreEqual(isRelevant, failureMechanism.IsRelevant); - Assert.AreEqual(entity.Comments, failureMechanism.Comments); + Assert.AreEqual(entity.InputComments, failureMechanism.InputComments.Comments); + Assert.AreEqual(entity.OutputComments, failureMechanism.OutputComments.Comments); + Assert.AreEqual(entity.NotRelevantComments, failureMechanism.NotRelevantComments.Comments); Assert.IsEmpty(failureMechanism.StochasticSoilModels); Assert.IsEmpty(failureMechanism.Sections); @@ -331,7 +339,9 @@ var entity = new FailureMechanismEntity { IsRelevant = Convert.ToByte(isRelevant), - Comments = "Some comment", + InputComments = "Some input text", + OutputComments = "Some output text", + NotRelevantComments = "Really not relevant", GrassCoverErosionInwardsFailureMechanismMetaEntities = { new GrassCoverErosionInwardsFailureMechanismMetaEntity @@ -350,7 +360,9 @@ // Assert Assert.IsNotNull(failureMechanism); Assert.AreEqual(isRelevant, failureMechanism.IsRelevant); - Assert.AreEqual(entity.Comments, failureMechanism.Comments); + Assert.AreEqual(entity.InputComments, failureMechanism.InputComments.Comments); + Assert.AreEqual(entity.OutputComments, failureMechanism.OutputComments.Comments); + Assert.AreEqual(entity.NotRelevantComments, failureMechanism.NotRelevantComments.Comments); Assert.IsEmpty(failureMechanism.Sections); Assert.AreEqual(3, failureMechanism.GeneralInput.N); @@ -492,7 +504,9 @@ var entity = new FailureMechanismEntity { IsRelevant = Convert.ToByte(isRelevant), - Comments = "Some comment", + InputComments = "Some input text", + OutputComments = "Some output text", + NotRelevantComments = "Really not relevant", GrassCoverErosionOutwardsFailureMechanismMetaEntities = { new GrassCoverErosionOutwardsFailureMechanismMetaEntity @@ -511,7 +525,9 @@ // Assert Assert.IsNotNull(failureMechanism); Assert.AreEqual(isRelevant, failureMechanism.IsRelevant); - Assert.AreEqual(entity.Comments, failureMechanism.Comments); + Assert.AreEqual(entity.InputComments, failureMechanism.InputComments.Comments); + Assert.AreEqual(entity.OutputComments, failureMechanism.OutputComments.Comments); + Assert.AreEqual(entity.NotRelevantComments, failureMechanism.NotRelevantComments.Comments); Assert.IsEmpty(failureMechanism.Sections); Assert.AreEqual(3, failureMechanism.GeneralInput.N);