Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/AssessmentSectionEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/AssessmentSectionEntity.cs (.../AssessmentSectionEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/AssessmentSectionEntity.cs (.../AssessmentSectionEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,20 +28,20 @@ // //------------------------------------------------------------------------------ -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class AssessmentSectionEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public AssessmentSectionEntity() { FailureMechanismEntities = new HashSet(); HydraulicLocationEntities = new HashSet(); } - + public long AssessmentSectionEntityId { get; set; } public long ProjectEntityId { get; set; } public string Id { get; set; } @@ -53,13 +53,11 @@ public short Composition { get; set; } public string ReferenceLinePointXml { get; set; } public int Order { get; set; } - + public virtual ProjectEntity ProjectEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection FailureMechanismEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection HydraulicLocationEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/CalculationGroupEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/CalculationGroupEntity.cs (.../CalculationGroupEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/CalculationGroupEntity.cs (.../CalculationGroupEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,15 +28,14 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class CalculationGroupEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public CalculationGroupEntity() { CalculationGroupEntity1 = new HashSet(); @@ -50,42 +49,32 @@ StabilityStoneCoverWaveConditionsCalculationEntities = new HashSet(); WaveImpactAsphaltCoverWaveConditionsCalculationEntities = new HashSet(); } - + public long CalculationGroupEntityId { get; set; } public Nullable ParentCalculationGroupEntityId { get; set; } public string Name { get; set; } public int Order { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection CalculationGroupEntity1 { get; set; } - public virtual CalculationGroupEntity CalculationGroupEntity2 { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection ClosingStructuresCalculationEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection FailureMechanismEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection GrassCoverErosionInwardsCalculationEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection GrassCoverErosionOutwardsWaveConditionsCalculationEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection HeightStructuresCalculationEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection PipingCalculationEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection StabilityPointStructuresCalculationEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection StabilityStoneCoverWaveConditionsCalculationEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection WaveImpactAsphaltCoverWaveConditionsCalculationEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/CharacteristicPointEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/CharacteristicPointEntity.cs (.../CharacteristicPointEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/CharacteristicPointEntity.cs (.../CharacteristicPointEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,10 +28,11 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class CharacteristicPointEntity { public long CharacteristicPointEntityId { get; set; } @@ -40,7 +41,7 @@ public Nullable X { get; set; } public Nullable Y { get; set; } public Nullable Z { get; set; } - + public virtual SurfaceLineEntity SurfaceLineEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructureEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructureEntity.cs (.../ClosingStructureEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructureEntity.cs (.../ClosingStructureEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,20 +28,19 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class ClosingStructureEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public ClosingStructureEntity() { ClosingStructuresCalculationEntities = new HashSet(); } - + public long ClosingStructureEntityId { get; set; } public long FailureMechanismEntityId { get; set; } public int Order { get; set; } @@ -73,10 +72,9 @@ public int IdenticalApertures { get; set; } public Nullable FailureProbabilityReparation { get; set; } public byte InflowModelType { get; set; } - + public virtual FailureMechanismEntity FailureMechanismEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection ClosingStructuresCalculationEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructureFailureMechanismMetaEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructureFailureMechanismMetaEntity.cs (.../ClosingStructureFailureMechanismMetaEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructureFailureMechanismMetaEntity.cs (.../ClosingStructureFailureMechanismMetaEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -30,12 +30,15 @@ namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class ClosingStructureFailureMechanismMetaEntity { public long ClosingStructureFailureMechanismMetaEntityId { get; set; } public long FailureMechanismEntityId { get; set; } public int N2A { get; set; } - + public virtual FailureMechanismEntity FailureMechanismEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructuresCalculationEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructuresCalculationEntity.cs (.../ClosingStructuresCalculationEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructuresCalculationEntity.cs (.../ClosingStructuresCalculationEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,21 +28,20 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class ClosingStructuresCalculationEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public ClosingStructuresCalculationEntity() { ClosingStructuresOutputEntities = new HashSet(); ClosingStructuresSectionResultEntities = new HashSet(); } - + public long ClosingStructuresCalculationEntityId { get; set; } public long CalculationGroupEntityId { get; set; } public Nullable ForeshoreProfileEntityId { get; set; } @@ -51,7 +50,18 @@ public int Order { get; set; } public string Name { get; set; } public string Comments { get; set; } + public byte UseBreakWater { get; set; } + public short BreakWaterType { get; set; } + public Nullable BreakWaterHeight { get; set; } + public byte UseForeshore { get; set; } public Nullable Orientation { get; set; } + public Nullable StructureNormalOrientation { get; set; } + public Nullable StorageStructureAreaMean { get; set; } + public Nullable StorageStructureAreaCoefficientOfVariation { get; set; } + public Nullable AllowedLevelIncreaseStorageMean { get; set; } + public Nullable AllowedLevelIncreaseStorageStandardDeviation { get; set; } + public Nullable WidthFlowAperturesMean { get; set; } + public Nullable WidthFlowAperturesCoefficientOfVariation { get; set; } public Nullable LevelCrestStructureNotClosingMean { get; set; } public Nullable LevelCrestStructureNotClosingStandardDeviation { get; set; } public Nullable InsideWaterLevelMean { get; set; } @@ -60,43 +70,29 @@ public Nullable ThresholdHeightOpenWeirStandardDeviation { get; set; } public Nullable AreaFlowAperturesMean { get; set; } public Nullable AreaFlowAperturesStandardDeviation { get; set; } + public Nullable CriticalOvertoppingDischargeMean { get; set; } + public Nullable CriticalOvertoppingDischargeCoefficientOfVariation { get; set; } + public Nullable FlowWidthAtBottomProtectionMean { get; set; } + public Nullable FlowWidthAtBottomProtectionStandardDeviation { get; set; } public double ProbabilityOpenStructureBeforeFlooding { get; set; } public double FailureProbabilityOpenStructure { get; set; } public int IdenticalApertures { get; set; } public double FailureProbabilityReparation { get; set; } public byte InflowModelType { get; set; } + public double FailureProbabilityStructureWithErosion { get; set; } public Nullable DeviationWaveDirection { get; set; } public Nullable DrainCoefficientMean { get; set; } + public Nullable ModelFactorSuperCriticalFlowMean { get; set; } + public Nullable StormDurationMean { get; set; } public Nullable FactorStormDurationOpenStructure { get; set; } - + public virtual CalculationGroupEntity CalculationGroupEntity { get; set; } public virtual ClosingStructureEntity ClosingStructureEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection ClosingStructuresOutputEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection ClosingStructuresSectionResultEntities { get; set; } - - public byte UseBreakWater { get; set; } - public short BreakWaterType { get; set; } - public Nullable BreakWaterHeight { get; set; } - public byte UseForeshore { get; set; } - public Nullable StructureNormalOrientation { get; set; } - public Nullable StorageStructureAreaMean { get; set; } - public Nullable StorageStructureAreaCoefficientOfVariation { get; set; } - public Nullable AllowedLevelIncreaseStorageMean { get; set; } - public Nullable AllowedLevelIncreaseStorageStandardDeviation { get; set; } - public Nullable WidthFlowAperturesMean { get; set; } - public Nullable WidthFlowAperturesCoefficientOfVariation { get; set; } - public Nullable CriticalOvertoppingDischargeMean { get; set; } - public Nullable CriticalOvertoppingDischargeCoefficientOfVariation { get; set; } - public Nullable FlowWidthAtBottomProtectionMean { get; set; } - public Nullable FlowWidthAtBottomProtectionStandardDeviation { get; set; } - public double FailureProbabilityStructureWithErosion { get; set; } - public Nullable ModelFactorSuperCriticalFlowMean { get; set; } - public Nullable StormDurationMean { get; set; } public virtual HydraulicLocationEntity HydraulicLocationEntity { get; set; } public virtual ForeshoreProfileEntity ForeshoreProfileEntity { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection ClosingStructuresOutputEntities { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection ClosingStructuresSectionResultEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructuresOutputEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructuresOutputEntity.cs (.../ClosingStructuresOutputEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructuresOutputEntity.cs (.../ClosingStructuresOutputEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,20 +28,21 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class ClosingStructuresOutputEntity { public long ClosingStructuresOutputEntityId { get; set; } public long ClosingStructuresCalculationEntityId { get; set; } - - public virtual ClosingStructuresCalculationEntity ClosingStructuresCalculationEntity { get; set; } public Nullable RequiredProbability { get; set; } public Nullable RequiredReliability { get; set; } public Nullable Probability { get; set; } public Nullable Reliability { get; set; } public Nullable FactorOfSafety { get; set; } + + public virtual ClosingStructuresCalculationEntity ClosingStructuresCalculationEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructuresSectionResultEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructuresSectionResultEntity.cs (.../ClosingStructuresSectionResultEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ClosingStructuresSectionResultEntity.cs (.../ClosingStructuresSectionResultEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,19 +28,20 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class ClosingStructuresSectionResultEntity { public long ClosingStructuresSectionResultEntityId { get; set; } public long FailureMechanismSectionEntityId { get; set; } public Nullable ClosingStructuresCalculationEntityId { get; set; } public byte LayerOne { get; set; } public Nullable LayerThree { get; set; } - + public virtual ClosingStructuresCalculationEntity ClosingStructuresCalculationEntity { get; set; } public virtual FailureMechanismSectionEntity FailureMechanismSectionEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/DatabaseStructure.sql =================================================================== diff -u -rcc3d0b350842ff7a7fd54f746525e1cc4e800a2e -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/DatabaseStructure.sql (.../DatabaseStructure.sql) (revision cc3d0b350842ff7a7fd54f746525e1cc4e800a2e) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/DatabaseStructure.sql (.../DatabaseStructure.sql) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -1,6 +1,6 @@ /* ---------------------------------------------------- */ /* Generated by Enterprise Architect Version 12.0 */ -/* Created On : 01-Nov-2016 12:53:48 PM */ +/* Created On : 17-nov-2016 11:31:00 */ /* DBMS : SQLite */ /* ---------------------------------------------------- */ @@ -569,7 +569,7 @@ ( 'PipingSectionResultEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismSectionEntityId' INTEGER NOT NULL, - 'LayerOne' TINYINT (1) NOT NULL, -- true or false + 'LayerOne' TINYINT (1) NOT NULL, -- Enum: 1 = NotAssessed 2 = Sufficient 3 = NeedsDetailedAssessment 'LayerThree' REAL, CONSTRAINT 'FK_PipingSectionResultEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade ) @@ -580,7 +580,7 @@ 'GrassCoverErosionInwardsSectionResultEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismSectionEntityId' INTEGER NOT NULL, 'GrassCoverErosionInwardsCalculationEntityId' INTEGER, - 'LayerOne' TINYINT (1) NOT NULL, -- true or false + 'LayerOne' TINYINT (1) NOT NULL, -- Enum: 1 = NotAssessed 2 = Sufficient 3 = NeedsDetailedAssessment 'LayerThree' REAL, CONSTRAINT 'FK_GrassCoverErosionInwardsSectionResultEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade, CONSTRAINT 'FK_GrassCoverErosionInwardsSectionResultEntity_GrassCoverErosionInwardsCalculationEntity' FOREIGN KEY ('GrassCoverErosionInwardsCalculationEntityId') REFERENCES 'GrassCoverErosionInwardsCalculationEntity' ('GrassCoverErosionInwardsCalculationEntityId') ON DELETE Set Null ON UPDATE Cascade @@ -592,7 +592,7 @@ 'HeightStructuresSectionResultEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismSectionEntityId' INTEGER NOT NULL, 'HeightStructuresCalculationEntityId' INTEGER, - 'LayerOne' TINYINT (1) NOT NULL, -- true or false + 'LayerOne' TINYINT (1) NOT NULL, -- Enum: 1 = NotAssessed 2 = Sufficient 3 = NeedsDetailedAssessment 'LayerThree' REAL, CONSTRAINT 'FK_HeightStructuresSectionResultEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade, CONSTRAINT 'FK_HeightStructuresSectionResultEntity_HeightStructuresCalculationEntity' FOREIGN KEY ('HeightStructuresCalculationEntityId') REFERENCES 'HeightStructuresCalculationEntity' ('HeightStructuresCalculationEntityId') ON DELETE Set Null ON UPDATE Cascade @@ -603,7 +603,7 @@ ( 'StrengthStabilityLengthwiseConstructionSectionResultEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismSectionEntityId' INTEGER NOT NULL, - 'LayerOne' TINYINT (1) NOT NULL, -- true or false + 'LayerOne' TINYINT (1) NOT NULL, -- Enum: 1 = NotAssessed 2 = Sufficient 3 = NeedsDetailedAssessment 'LayerThree' REAL, CONSTRAINT 'FK_StrengthStabilityLengthwiseConstructionSectionResultEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade ) @@ -613,7 +613,7 @@ ( 'TechnicalInnovationSectionResultEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismSectionEntityId' INTEGER NOT NULL, - 'LayerOne' TINYINT (1) NOT NULL, -- true or false + 'LayerOne' TINYINT (1) NOT NULL, -- Enum: 1 = NotAssessed 2 = Sufficient 3 = NeedsDetailedAssessment 'LayerThree' REAL, CONSTRAINT 'FK_TechnicalInnovationSectionResultEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade ) @@ -623,7 +623,7 @@ ( 'WaterPressureAsphaltCoverSectionResultEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismSectionEntityId' INTEGER NOT NULL, - 'LayerOne' TINYINT (1) NOT NULL, -- true or false + 'LayerOne' TINYINT (1) NOT NULL, -- Enum: 1 = NotAssessed 2 = Sufficient 3 = NeedsDetailedAssessment 'LayerThree' REAL, CONSTRAINT 'FK_WaterPressureAsphaltCoverSectionResultEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade ) @@ -634,7 +634,7 @@ 'ClosingStructuresSectionResultEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismSectionEntityId' INTEGER NOT NULL, 'ClosingStructuresCalculationEntityId' INTEGER, - 'LayerOne' TINYINT (1) NOT NULL, -- true or false + 'LayerOne' TINYINT (1) NOT NULL, -- Enum: 1 = NotAssessed 2 = Sufficient 3 = NeedsDetailedAssessment 'LayerThree' REAL, CONSTRAINT 'FK_ClosingStructuresSectionResultEntity_ClosingStructuresCalculationEntity' FOREIGN KEY ('ClosingStructuresCalculationEntityId') REFERENCES 'ClosingStructuresCalculationEntity' ('ClosingStructuresCalculationEntityId') ON DELETE Set Null ON UPDATE Cascade, CONSTRAINT 'FK_ClosingStructuresSectionResultEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade @@ -645,7 +645,7 @@ ( 'GrassCoverErosionOutwardsSectionResultEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismSectionEntityId' INTEGER NOT NULL, - 'LayerOne' TINYINT (1) NOT NULL, -- true or false + 'LayerOne' TINYINT (1) NOT NULL, -- Enum: 1 = NotAssessed 2 = Sufficient 3 = NeedsDetailedAssessment 'LayerTwoA' TINYINT (1) NOT NULL, -- Enum: 1 = NotCalculated 2 = Failed 3 = Successful 'LayerThree' REAL, CONSTRAINT 'FK_GrassCoverErosionOutwardsSectionResultEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade @@ -656,7 +656,7 @@ ( 'GrassCoverSlipOffInwardsSectionResultEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismSectionEntityId' INTEGER NOT NULL, - 'LayerOne' TINYINT (1) NOT NULL, -- true or false + 'LayerOne' TINYINT (1) NOT NULL, -- Enum: 1 = NotAssessed 2 = Sufficient 3 = NeedsDetailedAssessment 'LayerTwoA' TINYINT (1) NOT NULL, -- Enum: 1 = NotCalculated 2 = Failed 3 = Successful 'LayerThree' REAL, CONSTRAINT 'FK_GrassCoverSlipOffInwardsSectionResultEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade @@ -667,7 +667,7 @@ ( 'GrassCoverSlipOffOutwardsSectionResultEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismSectionEntityId' INTEGER NOT NULL, - 'LayerOne' TINYINT (1) NOT NULL, -- true or false + 'LayerOne' TINYINT (1) NOT NULL, -- Enum: 1 = NotAssessed 2 = Sufficient 3 = NeedsDetailedAssessment 'LayerTwoA' TINYINT (1) NOT NULL, -- Enum: 1 = NotCalculated 2 = Failed 3 = Successful 'LayerThree' REAL, CONSTRAINT 'FK_GrassCoverSlipOffOutwardsSectionResultEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade @@ -678,7 +678,7 @@ ( 'MacrostabilityInwardsSectionResultEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismSectionEntityId' INTEGER NOT NULL, - 'LayerOne' TINYINT (1) NOT NULL, -- true or false + 'LayerOne' TINYINT (1) NOT NULL, -- Enum: 1 = NotAssessed 2 = Sufficient 3 = NeedsDetailedAssessment 'LayerTwoA' REAL, 'LayerThree' REAL, CONSTRAINT 'FK_MacrostabilityInwardsSectionResultEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade @@ -689,7 +689,7 @@ ( 'MacrostabilityOutwardsSectionResultEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismSectionEntityId' INTEGER NOT NULL, - 'LayerOne' TINYINT (1) NOT NULL, -- true or false + 'LayerOne' TINYINT (1) NOT NULL, -- Enum: 1 = NotAssessed 2 = Sufficient 3 = NeedsDetailedAssessment 'LayerTwoA' REAL, 'LayerThree' REAL, CONSTRAINT 'FK_MacrostabilityOutwardsSectionResultEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade @@ -700,7 +700,7 @@ ( 'WaveImpactAsphaltCoverSectionResultEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismSectionEntityId' INTEGER NOT NULL, - 'LayerOne' TINYINT (1) NOT NULL, -- true or false + 'LayerOne' TINYINT (1) NOT NULL, -- Enum: 1 = NotAssessed 2 = Sufficient 3 = NeedsDetailedAssessment 'LayerTwoA' REAL, 'LayerThree' REAL, CONSTRAINT 'FK_WaveImpactAsphaltCoverSectionResultEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade @@ -711,7 +711,7 @@ ( 'MicrostabilitySectionResultEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismSectionEntityId' INTEGER NOT NULL, - 'LayerOne' TINYINT (1) NOT NULL, -- true or false + 'LayerOne' TINYINT (1) NOT NULL, -- Enum: 1 = NotAssessed 2 = Sufficient 3 = NeedsDetailedAssessment 'LayerTwoA' TINYINT (1) NOT NULL, -- Enum: 1 = NotCalculated 2 = Failed 3 = Successful 'LayerThree' REAL, CONSTRAINT 'FK_MicrostabilitySectionResultEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade @@ -722,7 +722,7 @@ ( 'PipingStructureSectionResultEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismSectionEntityId' INTEGER NOT NULL, - 'LayerOne' TINYINT (1) NOT NULL, -- true or false + 'LayerOne' TINYINT (1) NOT NULL, -- Enum: 1 = NotAssessed 2 = Sufficient 3 = NeedsDetailedAssessment 'LayerTwoA' TINYINT (1) NOT NULL, -- Enum: 1 = NotCalculated 2 = Failed 3 = Successful 'LayerThree' REAL, CONSTRAINT 'FK_PipingStructureSectionResultEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade @@ -733,7 +733,7 @@ ( 'DuneErosionSectionResultEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismSectionEntityId' INTEGER NOT NULL, - 'LayerOne' TINYINT (1) NOT NULL, + 'LayerOne' TINYINT (1) NOT NULL, -- Enum: 1 = NotAssessed 2 = Sufficient 3 = NeedsDetailedAssessment 'LayerTwoA' TINYINT (1) NOT NULL, -- Enum: 1 = NotCalculated 2 = Failed 3 = Successful 'LayerThree' REAL, CONSTRAINT 'FK_DuneErosionSectionResultEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade @@ -744,7 +744,7 @@ ( 'StabilityStoneCoverSectionResultEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismSectionEntityId' INTEGER NOT NULL, - 'LayerOne' TINYINT (1) NOT NULL, + 'LayerOne' TINYINT (1) NOT NULL, -- Enum: 1 = NotAssessed 2 = Sufficient 3 = NeedsDetailedAssessment 'LayerTwoA' TINYINT (1) NOT NULL, -- Enum: 1 = NotCalculated 2 = Failed 3 = Successful 'LayerThree' REAL, CONSTRAINT 'FK_StabilityStoneCoverSectionResultEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade @@ -756,7 +756,7 @@ 'StabilityPointStructuresSectionResultEntityId' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'FailureMechanismSectionEntityId' INTEGER NOT NULL, 'StabilityPointStructuresCalculationEntityId' INTEGER, - 'LayerOne' TINYINT (1) NOT NULL, + 'LayerOne' TINYINT (1) NOT NULL, -- Enum: 1 = NotAssessed 2 = Sufficient 3 = NeedsDetailedAssessment 'LayerThree' REAL, CONSTRAINT 'FK_StabilityPointStructuresSectionResultEntity_FailureMechanismSectionEntity' FOREIGN KEY ('FailureMechanismSectionEntityId') REFERENCES 'FailureMechanismSectionEntity' ('FailureMechanismSectionEntityId') ON DELETE Cascade ON UPDATE Cascade, CONSTRAINT 'FK_StabilityPointStructuresSectionResultEntity_StabilityPointStructuresCalculationEntity' FOREIGN KEY ('StabilityPointStructuresCalculationEntityId') REFERENCES 'StabilityPointStructuresCalculationEntity' ('StabilityPointStructuresCalculationEntityId') ON DELETE Set Null ON UPDATE Cascade Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/DikeProfileEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/DikeProfileEntity.cs (.../DikeProfileEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/DikeProfileEntity.cs (.../DikeProfileEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,20 +28,19 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class DikeProfileEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public DikeProfileEntity() { GrassCoverErosionInwardsCalculationEntities = new HashSet(); } - + public long DikeProfileEntityId { get; set; } public long FailureMechanismEntityId { get; set; } public string Name { get; set; } @@ -55,10 +54,9 @@ public Nullable Y { get; set; } public Nullable X0 { get; set; } public int Order { get; set; } - + public virtual FailureMechanismEntity FailureMechanismEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection GrassCoverErosionInwardsCalculationEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/DuneErosionSectionResultEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/DuneErosionSectionResultEntity.cs (.../DuneErosionSectionResultEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/DuneErosionSectionResultEntity.cs (.../DuneErosionSectionResultEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,18 +28,19 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class DuneErosionSectionResultEntity { public long DuneErosionSectionResultEntityId { get; set; } public long FailureMechanismSectionEntityId { get; set; } public byte LayerOne { get; set; } public byte LayerTwoA { get; set; } public Nullable LayerThree { get; set; } - + public virtual FailureMechanismSectionEntity FailureMechanismSectionEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/FailureMechanismEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/FailureMechanismEntity.cs (.../FailureMechanismEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/FailureMechanismEntity.cs (.../FailureMechanismEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,15 +28,14 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class FailureMechanismEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public FailureMechanismEntity() { ClosingStructureEntities = new HashSet(); @@ -55,60 +54,45 @@ StochasticSoilModelEntities = new HashSet(); SurfaceLineEntities = new HashSet(); } - + public long FailureMechanismEntityId { get; set; } public long AssessmentSectionEntityId { get; set; } public Nullable CalculationGroupEntityId { get; set; } public short FailureMechanismType { get; set; } public byte IsRelevant { get; set; } public string Comments { get; set; } - + public virtual AssessmentSectionEntity AssessmentSectionEntity { get; set; } public virtual CalculationGroupEntity CalculationGroupEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection ClosingStructureEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection ClosingStructureFailureMechanismMetaEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection DikeProfileEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection FailureMechanismSectionEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection ForeshoreProfileEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection GrassCoverErosionInwardsFailureMechanismMetaEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection GrassCoverErosionOutwardsFailureMechanismMetaEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection GrassCoverErosionOutwardsHydraulicLocationEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection HeightStructureEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection HeightStructuresFailureMechanismMetaEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection PipingFailureMechanismMetaEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection StabilityPointStructureEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection StabilityPointStructuresFailureMechanismMetaEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection StochasticSoilModelEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection SurfaceLineEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/FailureMechanismSectionEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/FailureMechanismSectionEntity.cs (.../FailureMechanismSectionEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/FailureMechanismSectionEntity.cs (.../FailureMechanismSectionEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,14 +28,14 @@ // //------------------------------------------------------------------------------ -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class FailureMechanismSectionEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public FailureMechanismSectionEntity() { ClosingStructuresSectionResultEntities = new HashSet(); @@ -57,66 +57,48 @@ WaterPressureAsphaltCoverSectionResultEntities = new HashSet(); WaveImpactAsphaltCoverSectionResultEntities = new HashSet(); } - + public long FailureMechanismSectionEntityId { get; set; } public long FailureMechanismEntityId { get; set; } public string Name { get; set; } public string FailureMechanismSectionPointXml { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection ClosingStructuresSectionResultEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection DuneErosionSectionResultEntities { get; set; } - public virtual FailureMechanismEntity FailureMechanismEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection GrassCoverErosionInwardsSectionResultEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection GrassCoverErosionOutwardsSectionResultEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection GrassCoverSlipOffInwardsSectionResultEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection GrassCoverSlipOffOutwardsSectionResultEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection HeightStructuresSectionResultEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection MacrostabilityInwardsSectionResultEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection MacrostabilityOutwardsSectionResultEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection MicrostabilitySectionResultEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection PipingSectionResultEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection PipingStructureSectionResultEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection StabilityPointStructuresSectionResultEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection StabilityStoneCoverSectionResultEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection StrengthStabilityLengthwiseConstructionSectionResultEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection TechnicalInnovationSectionResultEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection WaterPressureAsphaltCoverSectionResultEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection WaveImpactAsphaltCoverSectionResultEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ForeshoreProfileEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ForeshoreProfileEntity.cs (.../ForeshoreProfileEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ForeshoreProfileEntity.cs (.../ForeshoreProfileEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,15 +28,14 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class ForeshoreProfileEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public ForeshoreProfileEntity() { ClosingStructuresCalculationEntities = new HashSet(); @@ -46,7 +45,7 @@ StabilityStoneCoverWaveConditionsCalculationEntities = new HashSet(); WaveImpactAsphaltCoverWaveConditionsCalculationEntities = new HashSet(); } - + public long ForeshoreProfileEntityId { get; set; } public long FailureMechanismEntityId { get; set; } public string Name { get; set; } @@ -58,25 +57,19 @@ public Nullable Y { get; set; } public Nullable X0 { get; set; } public int Order { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection ClosingStructuresCalculationEntities { get; set; } - public virtual FailureMechanismEntity FailureMechanismEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection GrassCoverErosionOutwardsWaveConditionsCalculationEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection HeightStructuresCalculationEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection StabilityPointStructuresCalculationEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection StabilityStoneCoverWaveConditionsCalculationEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection WaveImpactAsphaltCoverWaveConditionsCalculationEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionInwardsCalculationEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionInwardsCalculationEntity.cs (.../GrassCoverErosionInwardsCalculationEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionInwardsCalculationEntity.cs (.../GrassCoverErosionInwardsCalculationEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,21 +28,20 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class GrassCoverErosionInwardsCalculationEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public GrassCoverErosionInwardsCalculationEntity() { GrassCoverErosionInwardsOutputEntities = new HashSet(); GrassCoverErosionInwardsSectionResultEntities = new HashSet(); } - + public long GrassCoverErosionInwardsCalculationEntityId { get; set; } public long CalculationGroupEntityId { get; set; } public Nullable HydraulicLocationEntityId { get; set; } @@ -59,15 +58,13 @@ public short BreakWaterType { get; set; } public Nullable BreakWaterHeight { get; set; } public byte CalculateDikeHeight { get; set; } - + public virtual CalculationGroupEntity CalculationGroupEntity { get; set; } public virtual DikeProfileEntity DikeProfileEntity { get; set; } public virtual HydraulicLocationEntity HydraulicLocationEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection GrassCoverErosionInwardsOutputEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection GrassCoverErosionInwardsSectionResultEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionInwardsFailureMechanismMetaEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionInwardsFailureMechanismMetaEntity.cs (.../GrassCoverErosionInwardsFailureMechanismMetaEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionInwardsFailureMechanismMetaEntity.cs (.../GrassCoverErosionInwardsFailureMechanismMetaEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -30,12 +30,15 @@ namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class GrassCoverErosionInwardsFailureMechanismMetaEntity { public long GrassCoverErosionInwardsFailureMechanismMetaEntityId { get; set; } public long FailureMechanismEntityId { get; set; } public int N { get; set; } - + public virtual FailureMechanismEntity FailureMechanismEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionInwardsOutputEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionInwardsOutputEntity.cs (.../GrassCoverErosionInwardsOutputEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionInwardsOutputEntity.cs (.../GrassCoverErosionInwardsOutputEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,10 +28,11 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class GrassCoverErosionInwardsOutputEntity { public long GrassCoverErosionInwardsOutputEntityId { get; set; } @@ -46,7 +47,7 @@ public Nullable Probability { get; set; } public Nullable Reliability { get; set; } public Nullable FactorOfSafety { get; set; } - + public virtual GrassCoverErosionInwardsCalculationEntity GrassCoverErosionInwardsCalculationEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionInwardsSectionResultEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionInwardsSectionResultEntity.cs (.../GrassCoverErosionInwardsSectionResultEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionInwardsSectionResultEntity.cs (.../GrassCoverErosionInwardsSectionResultEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,19 +28,20 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class GrassCoverErosionInwardsSectionResultEntity { public long GrassCoverErosionInwardsSectionResultEntityId { get; set; } public long FailureMechanismSectionEntityId { get; set; } public Nullable GrassCoverErosionInwardsCalculationEntityId { get; set; } public byte LayerOne { get; set; } public Nullable LayerThree { get; set; } - + public virtual FailureMechanismSectionEntity FailureMechanismSectionEntity { get; set; } public virtual GrassCoverErosionInwardsCalculationEntity GrassCoverErosionInwardsCalculationEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionOutwardsFailureMechanismMetaEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionOutwardsFailureMechanismMetaEntity.cs (.../GrassCoverErosionOutwardsFailureMechanismMetaEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionOutwardsFailureMechanismMetaEntity.cs (.../GrassCoverErosionOutwardsFailureMechanismMetaEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -30,12 +30,15 @@ namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class GrassCoverErosionOutwardsFailureMechanismMetaEntity { public long GrassCoverErosionOutwardsFailureMechanismMetaEntityId { get; set; } public long FailureMechanismEntityId { get; set; } public int N { get; set; } - + public virtual FailureMechanismEntity FailureMechanismEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionOutwardsHydraulicLocationEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionOutwardsHydraulicLocationEntity.cs (.../GrassCoverErosionOutwardsHydraulicLocationEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionOutwardsHydraulicLocationEntity.cs (.../GrassCoverErosionOutwardsHydraulicLocationEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,20 +28,19 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class GrassCoverErosionOutwardsHydraulicLocationEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public GrassCoverErosionOutwardsHydraulicLocationEntity() { GrassCoverErosionOutwardsWaveConditionsCalculationEntities = new HashSet(); } - + public long GrassCoverErosionOutwardsHydraulicLocationEntityId { get; set; } public long FailureMechanismEntityId { get; set; } public long LocationId { get; set; } @@ -53,10 +52,9 @@ public byte DesignWaterLevelCalculationConvergence { get; set; } public byte WaveHeightCalculationConvergence { get; set; } public int Order { get; set; } - + public virtual FailureMechanismEntity FailureMechanismEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection GrassCoverErosionOutwardsWaveConditionsCalculationEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionOutwardsSectionResultEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionOutwardsSectionResultEntity.cs (.../GrassCoverErosionOutwardsSectionResultEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionOutwardsSectionResultEntity.cs (.../GrassCoverErosionOutwardsSectionResultEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,18 +28,19 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class GrassCoverErosionOutwardsSectionResultEntity { public long GrassCoverErosionOutwardsSectionResultEntityId { get; set; } public long FailureMechanismSectionEntityId { get; set; } public byte LayerOne { get; set; } public byte LayerTwoA { get; set; } public Nullable LayerThree { get; set; } - + public virtual FailureMechanismSectionEntity FailureMechanismSectionEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionOutwardsWaveConditionsCalculationEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionOutwardsWaveConditionsCalculationEntity.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionOutwardsWaveConditionsCalculationEntity.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,20 +28,19 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class GrassCoverErosionOutwardsWaveConditionsCalculationEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public GrassCoverErosionOutwardsWaveConditionsCalculationEntity() { GrassCoverErosionOutwardsWaveConditionsOutputEntities = new HashSet(); } - + public long GrassCoverErosionOutwardsWaveConditionsCalculationEntityId { get; set; } public long CalculationGroupEntityId { get; set; } public Nullable ForeshoreProfileEntityId { get; set; } @@ -59,12 +58,11 @@ public Nullable UpperBoundaryWaterLevels { get; set; } public Nullable LowerBoundaryWaterLevels { get; set; } public byte StepSize { get; set; } - + public virtual CalculationGroupEntity CalculationGroupEntity { get; set; } public virtual ForeshoreProfileEntity ForeshoreProfileEntity { get; set; } public virtual GrassCoverErosionOutwardsHydraulicLocationEntity GrassCoverErosionOutwardsHydraulicLocationEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection GrassCoverErosionOutwardsWaveConditionsOutputEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionOutwardsWaveConditionsOutputEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionOutwardsWaveConditionsOutputEntity.cs (.../GrassCoverErosionOutwardsWaveConditionsOutputEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverErosionOutwardsWaveConditionsOutputEntity.cs (.../GrassCoverErosionOutwardsWaveConditionsOutputEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,10 +28,11 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class GrassCoverErosionOutwardsWaveConditionsOutputEntity { public long GrassCoverErosionOutwardsWaveConditionsOutputEntityId { get; set; } @@ -41,7 +42,7 @@ public Nullable WaveHeight { get; set; } public Nullable WavePeakPeriod { get; set; } public Nullable WaveAngle { get; set; } - + public virtual GrassCoverErosionOutwardsWaveConditionsCalculationEntity GrassCoverErosionOutwardsWaveConditionsCalculationEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverSlipOffInwardsSectionResultEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverSlipOffInwardsSectionResultEntity.cs (.../GrassCoverSlipOffInwardsSectionResultEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverSlipOffInwardsSectionResultEntity.cs (.../GrassCoverSlipOffInwardsSectionResultEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,18 +28,19 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class GrassCoverSlipOffInwardsSectionResultEntity { public long GrassCoverSlipOffInwardsSectionResultEntityId { get; set; } public long FailureMechanismSectionEntityId { get; set; } public byte LayerOne { get; set; } public byte LayerTwoA { get; set; } public Nullable LayerThree { get; set; } - + public virtual FailureMechanismSectionEntity FailureMechanismSectionEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverSlipOffOutwardsSectionResultEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverSlipOffOutwardsSectionResultEntity.cs (.../GrassCoverSlipOffOutwardsSectionResultEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/GrassCoverSlipOffOutwardsSectionResultEntity.cs (.../GrassCoverSlipOffOutwardsSectionResultEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,18 +28,19 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class GrassCoverSlipOffOutwardsSectionResultEntity { public long GrassCoverSlipOffOutwardsSectionResultEntityId { get; set; } public long FailureMechanismSectionEntityId { get; set; } public byte LayerOne { get; set; } public byte LayerTwoA { get; set; } public Nullable LayerThree { get; set; } - + public virtual FailureMechanismSectionEntity FailureMechanismSectionEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HeightStructureEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HeightStructureEntity.cs (.../HeightStructureEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HeightStructureEntity.cs (.../HeightStructureEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,20 +28,19 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class HeightStructureEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public HeightStructureEntity() { HeightStructuresCalculationEntities = new HashSet(); } - + public long HeightStructureEntityId { get; set; } public long FailureMechanismEntityId { get; set; } public int Order { get; set; } @@ -63,10 +62,9 @@ public Nullable StorageStructureAreaCoefficientOfVariation { get; set; } public Nullable AllowedLevelIncreaseStorageMean { get; set; } public Nullable AllowedLevelIncreaseStorageStandardDeviation { get; set; } - + public virtual FailureMechanismEntity FailureMechanismEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection HeightStructuresCalculationEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HeightStructuresCalculationEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HeightStructuresCalculationEntity.cs (.../HeightStructuresCalculationEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HeightStructuresCalculationEntity.cs (.../HeightStructuresCalculationEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,21 +28,20 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class HeightStructuresCalculationEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public HeightStructuresCalculationEntity() { HeightStructuresOutputEntities = new HashSet(); HeightStructuresSectionResultEntities = new HashSet(); } - + public long HeightStructuresCalculationEntityId { get; set; } public long CalculationGroupEntityId { get; set; } public Nullable HydraulicLocationEntityId { get; set; } @@ -51,19 +50,6 @@ public int Order { get; set; } public string Name { get; set; } public string Comments { get; set; } - public Nullable LevelCrestStructureMean { get; set; } - public Nullable LevelCrestStructureStandardDeviation { get; set; } - public Nullable DeviationWaveDirection { get; set; } - - public virtual CalculationGroupEntity CalculationGroupEntity { get; set; } - public virtual HeightStructureEntity HeightStructureEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection HeightStructuresOutputEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection HeightStructuresSectionResultEntities { get; set; } - public Nullable ModelFactorSuperCriticalFlowMean { get; set; } public Nullable StructureNormalOrientation { get; set; } public Nullable AllowedLevelIncreaseStorageMean { get; set; } @@ -78,11 +64,21 @@ public Nullable WidthFlowAperturesMean { get; set; } public Nullable WidthFlowAperturesCoefficientOfVariation { get; set; } public Nullable StormDurationMean { get; set; } + public Nullable LevelCrestStructureMean { get; set; } + public Nullable LevelCrestStructureStandardDeviation { get; set; } + public Nullable DeviationWaveDirection { get; set; } public byte UseBreakWater { get; set; } public byte UseForeshore { get; set; } public short BreakWaterType { get; set; } public Nullable BreakWaterHeight { get; set; } + + public virtual CalculationGroupEntity CalculationGroupEntity { get; set; } public virtual ForeshoreProfileEntity ForeshoreProfileEntity { get; set; } + public virtual HeightStructureEntity HeightStructureEntity { get; set; } public virtual HydraulicLocationEntity HydraulicLocationEntity { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection HeightStructuresOutputEntities { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection HeightStructuresSectionResultEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HeightStructuresFailureMechanismMetaEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HeightStructuresFailureMechanismMetaEntity.cs (.../HeightStructuresFailureMechanismMetaEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HeightStructuresFailureMechanismMetaEntity.cs (.../HeightStructuresFailureMechanismMetaEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -30,12 +30,15 @@ namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class HeightStructuresFailureMechanismMetaEntity { public long HeightStructuresFailureMechanismMetaEntityId { get; set; } public long FailureMechanismEntityId { get; set; } public int N { get; set; } - + public virtual FailureMechanismEntity FailureMechanismEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HeightStructuresOutputEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HeightStructuresOutputEntity.cs (.../HeightStructuresOutputEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HeightStructuresOutputEntity.cs (.../HeightStructuresOutputEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,20 +28,21 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class HeightStructuresOutputEntity { public long HeightStructuresOutputEntityId { get; set; } public long HeightStructuresCalculationEntityId { get; set; } - - public virtual HeightStructuresCalculationEntity HeightStructuresCalculationEntity { get; set; } public Nullable RequiredProbability { get; set; } public Nullable RequiredReliability { get; set; } public Nullable Probability { get; set; } public Nullable Reliability { get; set; } public Nullable FactorOfSafety { get; set; } + + public virtual HeightStructuresCalculationEntity HeightStructuresCalculationEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HeightStructuresSectionResultEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HeightStructuresSectionResultEntity.cs (.../HeightStructuresSectionResultEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HeightStructuresSectionResultEntity.cs (.../HeightStructuresSectionResultEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,19 +28,20 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class HeightStructuresSectionResultEntity { public long HeightStructuresSectionResultEntityId { get; set; } public long FailureMechanismSectionEntityId { get; set; } public Nullable HeightStructuresCalculationEntityId { get; set; } public byte LayerOne { get; set; } public Nullable LayerThree { get; set; } - + public virtual FailureMechanismSectionEntity FailureMechanismSectionEntity { get; set; } public virtual HeightStructuresCalculationEntity HeightStructuresCalculationEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HydraulicLocationEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HydraulicLocationEntity.cs (.../HydraulicLocationEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/HydraulicLocationEntity.cs (.../HydraulicLocationEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,15 +28,14 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class HydraulicLocationEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public HydraulicLocationEntity() { ClosingStructuresCalculationEntities = new HashSet(); @@ -47,7 +46,7 @@ StabilityStoneCoverWaveConditionsCalculationEntities = new HashSet(); WaveImpactAsphaltCoverWaveConditionsCalculationEntities = new HashSet(); } - + public long HydraulicLocationEntityId { get; set; } public long AssessmentSectionEntityId { get; set; } public long LocationId { get; set; } @@ -59,28 +58,21 @@ public int Order { get; set; } public byte DesignWaterLevelCalculationConvergence { get; set; } public byte WaveHeightCalculationConvergence { get; set; } - + public virtual AssessmentSectionEntity AssessmentSectionEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection ClosingStructuresCalculationEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection GrassCoverErosionInwardsCalculationEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection HeightStructuresCalculationEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection PipingCalculationEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection StabilityPointStructuresCalculationEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection StabilityStoneCoverWaveConditionsCalculationEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection WaveImpactAsphaltCoverWaveConditionsCalculationEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/MacrostabilityInwardsSectionResultEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/MacrostabilityInwardsSectionResultEntity.cs (.../MacrostabilityInwardsSectionResultEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/MacrostabilityInwardsSectionResultEntity.cs (.../MacrostabilityInwardsSectionResultEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,18 +28,19 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class MacrostabilityInwardsSectionResultEntity { public long MacrostabilityInwardsSectionResultEntityId { get; set; } public long FailureMechanismSectionEntityId { get; set; } public byte LayerOne { get; set; } public Nullable LayerTwoA { get; set; } public Nullable LayerThree { get; set; } - + public virtual FailureMechanismSectionEntity FailureMechanismSectionEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/MacrostabilityOutwardsSectionResultEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/MacrostabilityOutwardsSectionResultEntity.cs (.../MacrostabilityOutwardsSectionResultEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/MacrostabilityOutwardsSectionResultEntity.cs (.../MacrostabilityOutwardsSectionResultEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,18 +28,19 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class MacrostabilityOutwardsSectionResultEntity { public long MacrostabilityOutwardsSectionResultEntityId { get; set; } public long FailureMechanismSectionEntityId { get; set; } public byte LayerOne { get; set; } public Nullable LayerTwoA { get; set; } public Nullable LayerThree { get; set; } - + public virtual FailureMechanismSectionEntity FailureMechanismSectionEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/MicrostabilitySectionResultEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/MicrostabilitySectionResultEntity.cs (.../MicrostabilitySectionResultEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/MicrostabilitySectionResultEntity.cs (.../MicrostabilitySectionResultEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,18 +28,19 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class MicrostabilitySectionResultEntity { public long MicrostabilitySectionResultEntityId { get; set; } public long FailureMechanismSectionEntityId { get; set; } public byte LayerOne { get; set; } public byte LayerTwoA { get; set; } public Nullable LayerThree { get; set; } - + public virtual FailureMechanismSectionEntity FailureMechanismSectionEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingCalculationEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingCalculationEntity.cs (.../PipingCalculationEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingCalculationEntity.cs (.../PipingCalculationEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,21 +28,20 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class PipingCalculationEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public PipingCalculationEntity() { PipingCalculationOutputEntities = new HashSet(); PipingSemiProbabilisticOutputEntities = new HashSet(); } - + public long PipingCalculationEntityId { get; set; } public long CalculationGroupEntityId { get; set; } public Nullable SurfaceLineEntityId { get; set; } @@ -59,16 +58,14 @@ public Nullable DampingFactorExitStandardDeviation { get; set; } public byte RelevantForScenario { get; set; } public Nullable ScenarioContribution { get; set; } - + public virtual CalculationGroupEntity CalculationGroupEntity { get; set; } public virtual HydraulicLocationEntity HydraulicLocationEntity { get; set; } public virtual SurfaceLineEntity SurfaceLineEntity { get; set; } public virtual StochasticSoilProfileEntity StochasticSoilProfileEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection PipingCalculationOutputEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection PipingSemiProbabilisticOutputEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingCalculationOutputEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingCalculationOutputEntity.cs (.../PipingCalculationOutputEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingCalculationOutputEntity.cs (.../PipingCalculationOutputEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,10 +28,11 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class PipingCalculationOutputEntity { public long PipingCalculationOutputEntityId { get; set; } @@ -43,7 +44,7 @@ public Nullable UpliftZValue { get; set; } public Nullable SellmeijerFactorOfSafety { get; set; } public Nullable SellmeijerZValue { get; set; } - + public virtual PipingCalculationEntity PipingCalculationEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingFailureMechanismMetaEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingFailureMechanismMetaEntity.cs (.../PipingFailureMechanismMetaEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingFailureMechanismMetaEntity.cs (.../PipingFailureMechanismMetaEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -30,12 +30,15 @@ namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class PipingFailureMechanismMetaEntity { public long PipingFailureMechanismMetaEntityId { get; set; } public long FailureMechanismEntityId { get; set; } public double A { get; set; } - + public virtual FailureMechanismEntity FailureMechanismEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingSectionResultEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingSectionResultEntity.cs (.../PipingSectionResultEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingSectionResultEntity.cs (.../PipingSectionResultEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,17 +28,18 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class PipingSectionResultEntity { public long PipingSectionResultEntityId { get; set; } public long FailureMechanismSectionEntityId { get; set; } public byte LayerOne { get; set; } public Nullable LayerThree { get; set; } - + public virtual FailureMechanismSectionEntity FailureMechanismSectionEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingSemiProbabilisticOutputEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingSemiProbabilisticOutputEntity.cs (.../PipingSemiProbabilisticOutputEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingSemiProbabilisticOutputEntity.cs (.../PipingSemiProbabilisticOutputEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,10 +28,11 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class PipingSemiProbabilisticOutputEntity { public long PipingSemiProbabilisticOutputEntityId { get; set; } @@ -51,7 +52,7 @@ public Nullable PipingProbability { get; set; } public Nullable PipingReliability { get; set; } public Nullable PipingFactorOfSafety { get; set; } - + public virtual PipingCalculationEntity PipingCalculationEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingStructureSectionResultEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingStructureSectionResultEntity.cs (.../PipingStructureSectionResultEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/PipingStructureSectionResultEntity.cs (.../PipingStructureSectionResultEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,18 +28,19 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class PipingStructureSectionResultEntity { public long PipingStructureSectionResultEntityId { get; set; } public long FailureMechanismSectionEntityId { get; set; } public byte LayerOne { get; set; } public byte LayerTwoA { get; set; } public Nullable LayerThree { get; set; } - + public virtual FailureMechanismSectionEntity FailureMechanismSectionEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ProjectEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ProjectEntity.cs (.../ProjectEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/ProjectEntity.cs (.../ProjectEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,23 +28,23 @@ // //------------------------------------------------------------------------------ -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class ProjectEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public ProjectEntity() { AssessmentSectionEntities = new HashSet(); } - + public long ProjectEntityId { get; set; } public string Description { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection AssessmentSectionEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.Context.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.Context.cs (.../RingtoetsEntities.Context.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.Context.cs (.../RingtoetsEntities.Context.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -95,7 +95,7 @@ public virtual DbSet WaveImpactAsphaltCoverSectionResultEntities { get; set; } public virtual DbSet WaveImpactAsphaltCoverWaveConditionsCalculationEntities { get; set; } public virtual DbSet WaveImpactAsphaltCoverWaveConditionsOutputEntities { get; set; } - + /// /// This method is called in a 'code first' approach when the model for a derived has been initialized, /// but before the model has been locked down and used to initialize the . Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx =================================================================== diff -u -rcc3d0b350842ff7a7fd54f746525e1cc4e800a2e -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx (.../RingtoetsEntities.edmx) (revision cc3d0b350842ff7a7fd54f746525e1cc4e800a2e) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx (.../RingtoetsEntities.edmx) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -4,7 +4,7 @@ - + Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx.diagram =================================================================== diff -u -rdd05f4bd0c583e119a7324a34ae5655a002f6a62 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx.diagram (.../RingtoetsEntities.edmx.diagram) (revision dd05f4bd0c583e119a7324a34ae5655a002f6a62) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.edmx.diagram (.../RingtoetsEntities.edmx.diagram) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -5,66 +5,66 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/SoilLayerEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/SoilLayerEntity.cs (.../SoilLayerEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/SoilLayerEntity.cs (.../SoilLayerEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,10 +28,11 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class SoilLayerEntity { public long SoilLayerEntityId { get; set; } @@ -48,7 +49,7 @@ public Nullable PermeabilityMean { get; set; } public Nullable PermeabilityDeviation { get; set; } public int Order { get; set; } - + public virtual SoilProfileEntity SoilProfileEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/SoilProfileEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/SoilProfileEntity.cs (.../SoilProfileEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/SoilProfileEntity.cs (.../SoilProfileEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,29 +28,27 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class SoilProfileEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public SoilProfileEntity() { SoilLayerEntities = new HashSet(); StochasticSoilProfileEntities = new HashSet(); } - + public long SoilProfileEntityId { get; set; } public Nullable Bottom { get; set; } public string Name { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection SoilLayerEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection StochasticSoilProfileEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityPointStructureEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityPointStructureEntity.cs (.../StabilityPointStructureEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityPointStructureEntity.cs (.../StabilityPointStructureEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,20 +28,19 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class StabilityPointStructureEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public StabilityPointStructureEntity() { StabilityPointStructuresCalculationEntities = new HashSet(); } - + public long StabilityPointStructureEntityId { get; set; } public long FailureMechanismEntityId { get; set; } public int Order { get; set; } @@ -94,10 +93,9 @@ public Nullable AreaFlowAperturesMean { get; set; } public Nullable AreaFlowAperturesStandardDeviation { get; set; } public byte InflowModelType { get; set; } - + public virtual FailureMechanismEntity FailureMechanismEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection StabilityPointStructuresCalculationEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityPointStructuresCalculationEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityPointStructuresCalculationEntity.cs (.../StabilityPointStructuresCalculationEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityPointStructuresCalculationEntity.cs (.../StabilityPointStructuresCalculationEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,21 +28,20 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class StabilityPointStructuresCalculationEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public StabilityPointStructuresCalculationEntity() { StabilityPointStructuresOutputEntities = new HashSet(); StabilityPointStructuresSectionResultEntities = new HashSet(); } - + public long StabilityPointStructuresCalculationEntityId { get; set; } public long CalculationGroupEntityId { get; set; } public Nullable ForeshoreProfileEntityId { get; set; } @@ -51,10 +50,25 @@ public int Order { get; set; } public string Name { get; set; } public string Comments { get; set; } + public byte UseBreakWater { get; set; } + public short BreakWaterType { get; set; } + public Nullable BreakWaterHeight { get; set; } + public byte UseForeshore { get; set; } + public Nullable StructureNormalOrientation { get; set; } + public Nullable StorageStructureAreaMean { get; set; } + public Nullable StorageStructureAreaCoefficientOfVariation { get; set; } + public Nullable AllowedLevelIncreaseStorageMean { get; set; } + public Nullable AllowedLevelIncreaseStorageStandardDeviation { get; set; } + public Nullable WidthFlowAperturesMean { get; set; } + public Nullable WidthFlowAperturesCoefficientOfVariation { get; set; } public Nullable InsideWaterLevelMean { get; set; } public Nullable InsideWaterLevelStandardDeviation { get; set; } public Nullable ThresholdHeightOpenWeirMean { get; set; } public Nullable ThresholdHeightOpenWeirStandardDeviation { get; set; } + public Nullable CriticalOvertoppingDischargeMean { get; set; } + public Nullable CriticalOvertoppingDischargeCoefficientOfVariation { get; set; } + public Nullable FlowWidthAtBottomProtectionMean { get; set; } + public Nullable FlowWidthAtBottomProtectionStandardDeviation { get; set; } public Nullable ConstructiveStrengthLinearLoadModelMean { get; set; } public Nullable ConstructiveStrengthLinearLoadModelCoefficientOfVariation { get; set; } public Nullable ConstructiveStrengthQuadraticLoadModelMean { get; set; } @@ -87,37 +101,19 @@ public byte InflowModelType { get; set; } public byte LoadSchematizationType { get; set; } public Nullable VolumicWeightWater { get; set; } + public Nullable StormDurationMean { get; set; } + public Nullable ModelFactorSuperCriticalFlowMean { get; set; } public Nullable FactorStormDurationOpenStructure { get; set; } public Nullable DrainCoefficientMean { get; set; } - + public double FailureProbabilityStructureWithErosion { get; set; } + public virtual CalculationGroupEntity CalculationGroupEntity { get; set; } + public virtual ForeshoreProfileEntity ForeshoreProfileEntity { get; set; } + public virtual HydraulicLocationEntity HydraulicLocationEntity { get; set; } public virtual StabilityPointStructureEntity StabilityPointStructureEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection StabilityPointStructuresOutputEntities { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection StabilityPointStructuresSectionResultEntities { get; set; } - - public byte UseBreakWater { get; set; } - public short BreakWaterType { get; set; } - public Nullable BreakWaterHeight { get; set; } - public byte UseForeshore { get; set; } - public Nullable StructureNormalOrientation { get; set; } - public Nullable StorageStructureAreaMean { get; set; } - public Nullable StorageStructureAreaCoefficientOfVariation { get; set; } - public Nullable AllowedLevelIncreaseStorageMean { get; set; } - public Nullable AllowedLevelIncreaseStorageStandardDeviation { get; set; } - public Nullable WidthFlowAperturesMean { get; set; } - public Nullable WidthFlowAperturesCoefficientOfVariation { get; set; } - public Nullable CriticalOvertoppingDischargeMean { get; set; } - public Nullable CriticalOvertoppingDischargeCoefficientOfVariation { get; set; } - public Nullable FlowWidthAtBottomProtectionMean { get; set; } - public Nullable FlowWidthAtBottomProtectionStandardDeviation { get; set; } - public Nullable StormDurationMean { get; set; } - public Nullable ModelFactorSuperCriticalFlowMean { get; set; } - public double FailureProbabilityStructureWithErosion { get; set; } - public virtual ForeshoreProfileEntity ForeshoreProfileEntity { get; set; } - public virtual HydraulicLocationEntity HydraulicLocationEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityPointStructuresFailureMechanismMetaEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityPointStructuresFailureMechanismMetaEntity.cs (.../StabilityPointStructuresFailureMechanismMetaEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityPointStructuresFailureMechanismMetaEntity.cs (.../StabilityPointStructuresFailureMechanismMetaEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -30,12 +30,15 @@ namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class StabilityPointStructuresFailureMechanismMetaEntity { public long StrengthStabilityPointConstructionFailureMechanismMetaEntityId { get; set; } public long FailureMechanismEntityId { get; set; } public int N { get; set; } - + public virtual FailureMechanismEntity FailureMechanismEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityPointStructuresOutputEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityPointStructuresOutputEntity.cs (.../StabilityPointStructuresOutputEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityPointStructuresOutputEntity.cs (.../StabilityPointStructuresOutputEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,20 +28,21 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class StabilityPointStructuresOutputEntity { public long StabilityPointStructuresOutputEntity1 { get; set; } public long StabilityPointStructuresCalculationEntityId { get; set; } - - public virtual StabilityPointStructuresCalculationEntity StabilityPointStructuresCalculationEntity { get; set; } public Nullable RequiredProbability { get; set; } public Nullable RequiredReliability { get; set; } public Nullable Probability { get; set; } public Nullable Reliability { get; set; } public Nullable FactorOfSafety { get; set; } + + public virtual StabilityPointStructuresCalculationEntity StabilityPointStructuresCalculationEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityPointStructuresSectionResultEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityPointStructuresSectionResultEntity.cs (.../StabilityPointStructuresSectionResultEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityPointStructuresSectionResultEntity.cs (.../StabilityPointStructuresSectionResultEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,19 +28,20 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class StabilityPointStructuresSectionResultEntity { public long StabilityPointStructuresSectionResultEntityId { get; set; } public long FailureMechanismSectionEntityId { get; set; } public Nullable StabilityPointStructuresCalculationEntityId { get; set; } public byte LayerOne { get; set; } public Nullable LayerThree { get; set; } - + public virtual FailureMechanismSectionEntity FailureMechanismSectionEntity { get; set; } public virtual StabilityPointStructuresCalculationEntity StabilityPointStructuresCalculationEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityStoneCoverSectionResultEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityStoneCoverSectionResultEntity.cs (.../StabilityStoneCoverSectionResultEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityStoneCoverSectionResultEntity.cs (.../StabilityStoneCoverSectionResultEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,18 +28,19 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class StabilityStoneCoverSectionResultEntity { public long StabilityStoneCoverSectionResultEntityId { get; set; } public long FailureMechanismSectionEntityId { get; set; } public byte LayerOne { get; set; } public byte LayerTwoA { get; set; } public Nullable LayerThree { get; set; } - + public virtual FailureMechanismSectionEntity FailureMechanismSectionEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityStoneCoverWaveConditionsCalculationEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityStoneCoverWaveConditionsCalculationEntity.cs (.../StabilityStoneCoverWaveConditionsCalculationEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityStoneCoverWaveConditionsCalculationEntity.cs (.../StabilityStoneCoverWaveConditionsCalculationEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,20 +28,19 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class StabilityStoneCoverWaveConditionsCalculationEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public StabilityStoneCoverWaveConditionsCalculationEntity() { StabilityStoneCoverWaveConditionsOutputEntities = new HashSet(); } - + public long StabilityStoneCoverWaveConditionsCalculationEntityId { get; set; } public long CalculationGroupEntityId { get; set; } public Nullable ForeshoreProfileEntityId { get; set; } @@ -59,12 +58,11 @@ public Nullable UpperBoundaryWaterLevels { get; set; } public Nullable LowerBoundaryWaterLevels { get; set; } public byte StepSize { get; set; } - + public virtual CalculationGroupEntity CalculationGroupEntity { get; set; } public virtual ForeshoreProfileEntity ForeshoreProfileEntity { get; set; } public virtual HydraulicLocationEntity HydraulicLocationEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection StabilityStoneCoverWaveConditionsOutputEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityStoneCoverWaveConditionsOutputEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityStoneCoverWaveConditionsOutputEntity.cs (.../StabilityStoneCoverWaveConditionsOutputEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StabilityStoneCoverWaveConditionsOutputEntity.cs (.../StabilityStoneCoverWaveConditionsOutputEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,10 +28,11 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class StabilityStoneCoverWaveConditionsOutputEntity { public long StabilityStoneCoverWaveConditionsOutputEntityId { get; set; } @@ -42,7 +43,7 @@ public Nullable WaveHeight { get; set; } public Nullable WavePeakPeriod { get; set; } public Nullable WaveAngle { get; set; } - + public virtual StabilityStoneCoverWaveConditionsCalculationEntity StabilityStoneCoverWaveConditionsCalculationEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StochasticSoilModelEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StochasticSoilModelEntity.cs (.../StochasticSoilModelEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StochasticSoilModelEntity.cs (.../StochasticSoilModelEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,29 +28,28 @@ // //------------------------------------------------------------------------------ -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class StochasticSoilModelEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public StochasticSoilModelEntity() { StochasticSoilProfileEntities = new HashSet(); } - + public long StochasticSoilModelEntityId { get; set; } public long FailureMechanismEntityId { get; set; } public string Name { get; set; } public string SegmentName { get; set; } public string StochasticSoilModelSegmentPointXml { get; set; } public int Order { get; set; } - + public virtual FailureMechanismEntity FailureMechanismEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection StochasticSoilProfileEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StochasticSoilProfileEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StochasticSoilProfileEntity.cs (.../StochasticSoilProfileEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StochasticSoilProfileEntity.cs (.../StochasticSoilProfileEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,30 +28,28 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class StochasticSoilProfileEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public StochasticSoilProfileEntity() { PipingCalculationEntities = new HashSet(); } - + public long StochasticSoilProfileEntityId { get; set; } public long SoilProfileEntityId { get; set; } public long StochasticSoilModelEntityId { get; set; } public Nullable Probability { get; set; } public int Order { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection PipingCalculationEntities { get; set; } - public virtual SoilProfileEntity SoilProfileEntity { get; set; } public virtual StochasticSoilModelEntity StochasticSoilModelEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StrengthStabilityLengthwiseConstructionSectionResultEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StrengthStabilityLengthwiseConstructionSectionResultEntity.cs (.../StrengthStabilityLengthwiseConstructionSectionResultEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/StrengthStabilityLengthwiseConstructionSectionResultEntity.cs (.../StrengthStabilityLengthwiseConstructionSectionResultEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,17 +28,18 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class StrengthStabilityLengthwiseConstructionSectionResultEntity { public long StrengthStabilityLengthwiseConstructionSectionResultEntityId { get; set; } public long FailureMechanismSectionEntityId { get; set; } public byte LayerOne { get; set; } public Nullable LayerThree { get; set; } - + public virtual FailureMechanismSectionEntity FailureMechanismSectionEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/SurfaceLineEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/SurfaceLineEntity.cs (.../SurfaceLineEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/SurfaceLineEntity.cs (.../SurfaceLineEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,35 +28,32 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class SurfaceLineEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public SurfaceLineEntity() { CharacteristicPointEntities = new HashSet(); PipingCalculationEntities = new HashSet(); } - + public long SurfaceLineEntityId { get; set; } public long FailureMechanismEntityId { get; set; } public string Name { get; set; } public Nullable ReferenceLineIntersectionX { get; set; } public Nullable ReferenceLineIntersectionY { get; set; } public string PointsXml { get; set; } public int Order { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection CharacteristicPointEntities { get; set; } - public virtual FailureMechanismEntity FailureMechanismEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection PipingCalculationEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/TechnicalInnovationSectionResultEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/TechnicalInnovationSectionResultEntity.cs (.../TechnicalInnovationSectionResultEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/TechnicalInnovationSectionResultEntity.cs (.../TechnicalInnovationSectionResultEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,17 +28,18 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class TechnicalInnovationSectionResultEntity { public long TechnicalInnovationSectionResultEntityId { get; set; } public long FailureMechanismSectionEntityId { get; set; } public byte LayerOne { get; set; } public Nullable LayerThree { get; set; } - + public virtual FailureMechanismSectionEntity FailureMechanismSectionEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/VersionEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/VersionEntity.cs (.../VersionEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/VersionEntity.cs (.../VersionEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,15 +28,16 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class VersionEntity { public long VersionId { get; set; } public long Version { get; set; } - public DateTime Timestamp { get; set; } + public System.DateTime Timestamp { get; set; } public byte[] FingerPrint { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/WaterPressureAsphaltCoverSectionResultEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/WaterPressureAsphaltCoverSectionResultEntity.cs (.../WaterPressureAsphaltCoverSectionResultEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/WaterPressureAsphaltCoverSectionResultEntity.cs (.../WaterPressureAsphaltCoverSectionResultEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,17 +28,18 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class WaterPressureAsphaltCoverSectionResultEntity { public long WaterPressureAsphaltCoverSectionResultEntityId { get; set; } public long FailureMechanismSectionEntityId { get; set; } public byte LayerOne { get; set; } public Nullable LayerThree { get; set; } - + public virtual FailureMechanismSectionEntity FailureMechanismSectionEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/WaveImpactAsphaltCoverSectionResultEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/WaveImpactAsphaltCoverSectionResultEntity.cs (.../WaveImpactAsphaltCoverSectionResultEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/WaveImpactAsphaltCoverSectionResultEntity.cs (.../WaveImpactAsphaltCoverSectionResultEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,18 +28,19 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class WaveImpactAsphaltCoverSectionResultEntity { public long WaveImpactAsphaltCoverSectionResultEntityId { get; set; } public long FailureMechanismSectionEntityId { get; set; } public byte LayerOne { get; set; } public Nullable LayerTwoA { get; set; } public Nullable LayerThree { get; set; } - + public virtual FailureMechanismSectionEntity FailureMechanismSectionEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/WaveImpactAsphaltCoverWaveConditionsCalculationEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/WaveImpactAsphaltCoverWaveConditionsCalculationEntity.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/WaveImpactAsphaltCoverWaveConditionsCalculationEntity.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,20 +28,19 @@ // //------------------------------------------------------------------------------ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class WaveImpactAsphaltCoverWaveConditionsCalculationEntity { - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public WaveImpactAsphaltCoverWaveConditionsCalculationEntity() { WaveImpactAsphaltCoverWaveConditionsOutputEntities = new HashSet(); } - + public long WaveImpactAsphaltCoverWaveConditionsCalculationEntityId { get; set; } public long CalculationGroupEntityId { get; set; } public Nullable ForeshoreProfileEntityId { get; set; } @@ -59,12 +58,11 @@ public Nullable UpperBoundaryWaterLevels { get; set; } public Nullable LowerBoundaryWaterLevels { get; set; } public byte StepSize { get; set; } - + public virtual CalculationGroupEntity CalculationGroupEntity { get; set; } public virtual ForeshoreProfileEntity ForeshoreProfileEntity { get; set; } public virtual HydraulicLocationEntity HydraulicLocationEntity { get; set; } - - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection WaveImpactAsphaltCoverWaveConditionsOutputEntities { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/WaveImpactAsphaltCoverWaveConditionsOutputEntity.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/WaveImpactAsphaltCoverWaveConditionsOutputEntity.cs (.../WaveImpactAsphaltCoverWaveConditionsOutputEntity.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/WaveImpactAsphaltCoverWaveConditionsOutputEntity.cs (.../WaveImpactAsphaltCoverWaveConditionsOutputEntity.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -28,10 +28,11 @@ // //------------------------------------------------------------------------------ -using System; - namespace Application.Ringtoets.Storage.DbContext { + using System; + using System.Collections.Generic; + public partial class WaveImpactAsphaltCoverWaveConditionsOutputEntity { public long WaveImpactAsphaltCoverWaveConditionsOutputEntityId { get; set; } @@ -41,7 +42,7 @@ public Nullable WaveHeight { get; set; } public Nullable WavePeakPeriod { get; set; } public Nullable WaveAngle { get; set; } - + public virtual WaveImpactAsphaltCoverWaveConditionsCalculationEntity WaveImpactAsphaltCoverWaveConditionsCalculationEntity { get; set; } } -} \ No newline at end of file +} Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensions.cs =================================================================== diff -u -r86ce17cdf5cf329f4d5bcd444320994fead52294 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensions.cs (.../ClosingStructuresSectionResultEntityReadExtensions.cs) (revision 86ce17cdf5cf329f4d5bcd444320994fead52294) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensions.cs (.../ClosingStructuresSectionResultEntityReadExtensions.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -23,6 +23,7 @@ using Application.Ringtoets.Storage.DbContext; using Core.Common.Base.Data; using Ringtoets.ClosingStructures.Data; +using Ringtoets.Common.Data.FailureMechanism; namespace Application.Ringtoets.Storage.Read.ClosingStructures { @@ -53,7 +54,7 @@ throw new ArgumentNullException("collector"); } - sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); if (entity.ClosingStructuresCalculationEntity != null) Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/DuneErosion/DuneErosionSectionResultEntityReadExtensions.cs =================================================================== diff -u -r86ce17cdf5cf329f4d5bcd444320994fead52294 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/DuneErosion/DuneErosionSectionResultEntityReadExtensions.cs (.../DuneErosionSectionResultEntityReadExtensions.cs) (revision 86ce17cdf5cf329f4d5bcd444320994fead52294) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/DuneErosion/DuneErosionSectionResultEntityReadExtensions.cs (.../DuneErosionSectionResultEntityReadExtensions.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -48,7 +48,7 @@ throw new ArgumentNullException("sectionResult"); } - sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; sectionResult.AssessmentLayerTwoA = (AssessmentLayerTwoAResult) entity.LayerTwoA; sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/GrassCoverErosionInwards/GrassCoverErosionInwardsSectionResultEntityReadExtensions.cs =================================================================== diff -u -r04cb34562587c9b06345f2e639c57394e6a7d0a7 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/GrassCoverErosionInwards/GrassCoverErosionInwardsSectionResultEntityReadExtensions.cs (.../GrassCoverErosionInwardsSectionResultEntityReadExtensions.cs) (revision 04cb34562587c9b06345f2e639c57394e6a7d0a7) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/GrassCoverErosionInwards/GrassCoverErosionInwardsSectionResultEntityReadExtensions.cs (.../GrassCoverErosionInwardsSectionResultEntityReadExtensions.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -22,6 +22,7 @@ using System; using Application.Ringtoets.Storage.DbContext; using Core.Common.Base.Data; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.GrassCoverErosionInwards.Data; namespace Application.Ringtoets.Storage.Read.GrassCoverErosionInwards @@ -52,7 +53,7 @@ throw new ArgumentNullException("sectionResult"); } - sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); if (entity.GrassCoverErosionInwardsCalculationEntity != null) { Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/GrassCoverErosionOutwards/GrassCoverErosionOutwardsSectionResultEntityReadExtensions.cs =================================================================== diff -u -r217b6c069ac85aef817e5423cecb0b037edac668 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/GrassCoverErosionOutwards/GrassCoverErosionOutwardsSectionResultEntityReadExtensions.cs (.../GrassCoverErosionOutwardsSectionResultEntityReadExtensions.cs) (revision 217b6c069ac85aef817e5423cecb0b037edac668) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/GrassCoverErosionOutwards/GrassCoverErosionOutwardsSectionResultEntityReadExtensions.cs (.../GrassCoverErosionOutwardsSectionResultEntityReadExtensions.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -48,7 +48,7 @@ throw new ArgumentNullException("sectionResult"); } - sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; sectionResult.AssessmentLayerTwoA = (AssessmentLayerTwoAResult) entity.LayerTwoA; sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/GrassCoverSlipOffInwardsSectionResultEntityReadExtensions.cs =================================================================== diff -u -r11f0867b39150ae5fac83dc178a89fee46d27611 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/GrassCoverSlipOffInwardsSectionResultEntityReadExtensions.cs (.../GrassCoverSlipOffInwardsSectionResultEntityReadExtensions.cs) (revision 11f0867b39150ae5fac83dc178a89fee46d27611) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/GrassCoverSlipOffInwardsSectionResultEntityReadExtensions.cs (.../GrassCoverSlipOffInwardsSectionResultEntityReadExtensions.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -48,7 +48,7 @@ throw new ArgumentNullException("sectionResult"); } - sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; sectionResult.AssessmentLayerTwoA = (AssessmentLayerTwoAResult) entity.LayerTwoA; sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/GrassCoverSlipOffOutwardsSectionResultEntityReadExtensions.cs =================================================================== diff -u -r11f0867b39150ae5fac83dc178a89fee46d27611 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/GrassCoverSlipOffOutwardsSectionResultEntityReadExtensions.cs (.../GrassCoverSlipOffOutwardsSectionResultEntityReadExtensions.cs) (revision 11f0867b39150ae5fac83dc178a89fee46d27611) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/GrassCoverSlipOffOutwardsSectionResultEntityReadExtensions.cs (.../GrassCoverSlipOffOutwardsSectionResultEntityReadExtensions.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -48,7 +48,7 @@ throw new ArgumentNullException("sectionResult"); } - sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; sectionResult.AssessmentLayerTwoA = (AssessmentLayerTwoAResult) entity.LayerTwoA; sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/HeightStructures/HeightStructuresSectionResultEntityReadExtensions.cs =================================================================== diff -u -r04cb34562587c9b06345f2e639c57394e6a7d0a7 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/HeightStructures/HeightStructuresSectionResultEntityReadExtensions.cs (.../HeightStructuresSectionResultEntityReadExtensions.cs) (revision 04cb34562587c9b06345f2e639c57394e6a7d0a7) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/HeightStructures/HeightStructuresSectionResultEntityReadExtensions.cs (.../HeightStructuresSectionResultEntityReadExtensions.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -22,6 +22,7 @@ using System; using Application.Ringtoets.Storage.DbContext; using Core.Common.Base.Data; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.HeightStructures.Data; namespace Application.Ringtoets.Storage.Read.HeightStructures @@ -53,7 +54,7 @@ { throw new ArgumentNullException("collector"); } - sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); if (entity.HeightStructuresCalculationEntity != null) Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MacrostabilityInwardsSectionResultEntityReadExtensions.cs =================================================================== diff -u -r11f0867b39150ae5fac83dc178a89fee46d27611 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MacrostabilityInwardsSectionResultEntityReadExtensions.cs (.../MacrostabilityInwardsSectionResultEntityReadExtensions.cs) (revision 11f0867b39150ae5fac83dc178a89fee46d27611) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MacrostabilityInwardsSectionResultEntityReadExtensions.cs (.../MacrostabilityInwardsSectionResultEntityReadExtensions.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -22,6 +22,7 @@ using System; using Application.Ringtoets.Storage.DbContext; using Core.Common.Base.Data; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Integration.Data.StandAlone.SectionResults; namespace Application.Ringtoets.Storage.Read @@ -47,7 +48,7 @@ throw new ArgumentNullException("sectionResult"); } - sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; sectionResult.AssessmentLayerTwoA = (RoundedDouble) entity.LayerTwoA.ToNullAsNaN(); sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MacrostabilityOutwardsSectionResultEntityReadExtensions.cs =================================================================== diff -u -r11f0867b39150ae5fac83dc178a89fee46d27611 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MacrostabilityOutwardsSectionResultEntityReadExtensions.cs (.../MacrostabilityOutwardsSectionResultEntityReadExtensions.cs) (revision 11f0867b39150ae5fac83dc178a89fee46d27611) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MacrostabilityOutwardsSectionResultEntityReadExtensions.cs (.../MacrostabilityOutwardsSectionResultEntityReadExtensions.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -22,6 +22,7 @@ using System; using Application.Ringtoets.Storage.DbContext; using Core.Common.Base.Data; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Integration.Data.StandAlone.SectionResults; namespace Application.Ringtoets.Storage.Read @@ -47,7 +48,7 @@ throw new ArgumentNullException("sectionResult"); } - sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; sectionResult.AssessmentLayerTwoA = (RoundedDouble) entity.LayerTwoA.ToNullAsNaN(); sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MicrostabilitySectionResultEntityReadExtensions.cs =================================================================== diff -u -r11f0867b39150ae5fac83dc178a89fee46d27611 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MicrostabilitySectionResultEntityReadExtensions.cs (.../MicrostabilitySectionResultEntityReadExtensions.cs) (revision 11f0867b39150ae5fac83dc178a89fee46d27611) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/MicrostabilitySectionResultEntityReadExtensions.cs (.../MicrostabilitySectionResultEntityReadExtensions.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -48,7 +48,7 @@ throw new ArgumentNullException("sectionResult"); } - sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; sectionResult.AssessmentLayerTwoA = (AssessmentLayerTwoAResult) entity.LayerTwoA; sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/Piping/PipingSectionResultEntityReadExtensions.cs =================================================================== diff -u -r11f0867b39150ae5fac83dc178a89fee46d27611 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/Piping/PipingSectionResultEntityReadExtensions.cs (.../PipingSectionResultEntityReadExtensions.cs) (revision 11f0867b39150ae5fac83dc178a89fee46d27611) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/Piping/PipingSectionResultEntityReadExtensions.cs (.../PipingSectionResultEntityReadExtensions.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -22,6 +22,7 @@ using System; using Application.Ringtoets.Storage.DbContext; using Core.Common.Base.Data; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Piping.Data; namespace Application.Ringtoets.Storage.Read.Piping @@ -46,7 +47,7 @@ { throw new ArgumentNullException("sectionResult"); } - sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); } } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/PipingStructures/PipingStructureSectionResultEntityReadExtensions.cs =================================================================== diff -u -r6e33ada58f1a53a5a732c3b4e46583ad846a2983 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/PipingStructures/PipingStructureSectionResultEntityReadExtensions.cs (.../PipingStructureSectionResultEntityReadExtensions.cs) (revision 6e33ada58f1a53a5a732c3b4e46583ad846a2983) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/PipingStructures/PipingStructureSectionResultEntityReadExtensions.cs (.../PipingStructureSectionResultEntityReadExtensions.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -48,7 +48,7 @@ throw new ArgumentNullException("sectionResult"); } - sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; sectionResult.AssessmentLayerTwoA = (AssessmentLayerTwoAResult) entity.LayerTwoA; sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityPointStructures/StabilityPointStructuresSectionResultEntityReadExtensions.cs =================================================================== diff -u -r86ce17cdf5cf329f4d5bcd444320994fead52294 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityPointStructures/StabilityPointStructuresSectionResultEntityReadExtensions.cs (.../StabilityPointStructuresSectionResultEntityReadExtensions.cs) (revision 86ce17cdf5cf329f4d5bcd444320994fead52294) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityPointStructures/StabilityPointStructuresSectionResultEntityReadExtensions.cs (.../StabilityPointStructuresSectionResultEntityReadExtensions.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -22,6 +22,7 @@ using System; using Application.Ringtoets.Storage.DbContext; using Core.Common.Base.Data; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.StabilityPointStructures.Data; namespace Application.Ringtoets.Storage.Read.StabilityPointStructures @@ -53,7 +54,7 @@ throw new ArgumentNullException("collector"); } - sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); if (entity.StabilityPointStructuresCalculationEntity != null) Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityStoneCover/StabilityStoneCoverSectionResultEntityReadExtensions.cs =================================================================== diff -u -r86ce17cdf5cf329f4d5bcd444320994fead52294 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityStoneCover/StabilityStoneCoverSectionResultEntityReadExtensions.cs (.../StabilityStoneCoverSectionResultEntityReadExtensions.cs) (revision 86ce17cdf5cf329f4d5bcd444320994fead52294) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StabilityStoneCover/StabilityStoneCoverSectionResultEntityReadExtensions.cs (.../StabilityStoneCoverSectionResultEntityReadExtensions.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -48,7 +48,7 @@ throw new ArgumentNullException("sectionResult"); } - sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; sectionResult.AssessmentLayerTwoA = (AssessmentLayerTwoAResult) entity.LayerTwoA; sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StrengthStabilityLengthwiseConstructionSectionResultEntityReadExtensions.cs =================================================================== diff -u -r11f0867b39150ae5fac83dc178a89fee46d27611 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StrengthStabilityLengthwiseConstructionSectionResultEntityReadExtensions.cs (.../StrengthStabilityLengthwiseConstructionSectionResultEntityReadExtensions.cs) (revision 11f0867b39150ae5fac83dc178a89fee46d27611) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/StrengthStabilityLengthwiseConstructionSectionResultEntityReadExtensions.cs (.../StrengthStabilityLengthwiseConstructionSectionResultEntityReadExtensions.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -22,6 +22,7 @@ using System; using Application.Ringtoets.Storage.DbContext; using Core.Common.Base.Data; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Integration.Data.StandAlone.SectionResults; namespace Application.Ringtoets.Storage.Read @@ -46,7 +47,7 @@ { throw new ArgumentNullException("sectionResult"); } - sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); } } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/TechnicalInnovationSectionResultEntityReadExtensions.cs =================================================================== diff -u -r11f0867b39150ae5fac83dc178a89fee46d27611 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/TechnicalInnovationSectionResultEntityReadExtensions.cs (.../TechnicalInnovationSectionResultEntityReadExtensions.cs) (revision 11f0867b39150ae5fac83dc178a89fee46d27611) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/TechnicalInnovationSectionResultEntityReadExtensions.cs (.../TechnicalInnovationSectionResultEntityReadExtensions.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -22,6 +22,7 @@ using System; using Application.Ringtoets.Storage.DbContext; using Core.Common.Base.Data; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Integration.Data.StandAlone.SectionResults; namespace Application.Ringtoets.Storage.Read @@ -46,7 +47,7 @@ { throw new ArgumentNullException("sectionResult"); } - sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); } } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/WaterPressureAsphaltCoverSectionResultEntityReadExtensions.cs =================================================================== diff -u -r11f0867b39150ae5fac83dc178a89fee46d27611 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/WaterPressureAsphaltCoverSectionResultEntityReadExtensions.cs (.../WaterPressureAsphaltCoverSectionResultEntityReadExtensions.cs) (revision 11f0867b39150ae5fac83dc178a89fee46d27611) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/WaterPressureAsphaltCoverSectionResultEntityReadExtensions.cs (.../WaterPressureAsphaltCoverSectionResultEntityReadExtensions.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -22,6 +22,7 @@ using System; using Application.Ringtoets.Storage.DbContext; using Core.Common.Base.Data; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Integration.Data.StandAlone.SectionResults; namespace Application.Ringtoets.Storage.Read @@ -46,7 +47,7 @@ { throw new ArgumentNullException("sectionResult"); } - sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); } } Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/WaveImpactAsphaltCover/WaveImpactAsphaltCoverSectionResultEntityReadExtensions.cs =================================================================== diff -u -r5cc8a49cc445a67f425ced8216c772b9170ea517 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/WaveImpactAsphaltCover/WaveImpactAsphaltCoverSectionResultEntityReadExtensions.cs (.../WaveImpactAsphaltCoverSectionResultEntityReadExtensions.cs) (revision 5cc8a49cc445a67f425ced8216c772b9170ea517) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/WaveImpactAsphaltCover/WaveImpactAsphaltCoverSectionResultEntityReadExtensions.cs (.../WaveImpactAsphaltCoverSectionResultEntityReadExtensions.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -22,6 +22,7 @@ using System; using Application.Ringtoets.Storage.DbContext; using Core.Common.Base.Data; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.WaveImpactAsphaltCover.Data; namespace Application.Ringtoets.Storage.Read.WaveImpactAsphaltCover @@ -47,7 +48,7 @@ throw new ArgumentNullException("sectionResult"); } - sectionResult.AssessmentLayerOne = Convert.ToBoolean(entity.LayerOne); + sectionResult.AssessmentLayerOne = (AssessmentLayerOneState) entity.LayerOne; sectionResult.AssessmentLayerTwoA = (RoundedDouble) entity.LayerTwoA.ToNullAsNaN(); sectionResult.AssessmentLayerThree = (RoundedDouble) entity.LayerThree.ToNullAsNaN(); } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ClosingStructures/ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r25cb0404c9026690062e1a17b1ef5e9ecdb176f6 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ClosingStructures/ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 25cb0404c9026690062e1a17b1ef5e9ecdb176f6) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/ClosingStructures/ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../ClosingStructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -27,6 +27,7 @@ using Core.Common.Base.Data; using NUnit.Framework; using Ringtoets.ClosingStructures.Data; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Structures; namespace Application.Ringtoets.Storage.Test.Create.ClosingStructures @@ -49,7 +50,8 @@ [Test] public void Create_WithDifferentResults_ReturnsEntityWithExpectedResults( - [Values(true, false)] bool assessmentLayerOneResult, + [Values(AssessmentLayerOneState.NotAssessed, AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerOneState.Sufficient)] AssessmentLayerOneState assessmentLayerOneResult, [Values(3.2, 4.5)] double assessmentLayerThreeResult) { // Setup Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/DuneErosion/DuneErosionFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r7ae9100ff4e61169edcefaeb01b72d492431742f -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/DuneErosion/DuneErosionFailureMechanismSectionResultCreateExtensionsTest.cs (.../DuneErosionFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 7ae9100ff4e61169edcefaeb01b72d492431742f) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/DuneErosion/DuneErosionFailureMechanismSectionResultCreateExtensionsTest.cs (.../DuneErosionFailureMechanismSectionResultCreateExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -36,7 +36,7 @@ public void Create_ValidData_ReturnsEntityEqualData() { // Setup - const bool assessmentLayerOneResult = false; + const AssessmentLayerOneState assessmentLayerOneResult = AssessmentLayerOneState.NotAssessed; AssessmentLayerTwoAResult assessmentLayerTwoAResult = AssessmentLayerTwoAResult.Failed; var assessmentLayerThreeResult = 3.2; var sectionResult = new DuneErosionFailureMechanismSectionResult(new TestFailureMechanismSection()) Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r08bb51221d82157423573733a9bf43e0191c9b68 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../GrassCoverErosionInwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 08bb51221d82157423573733a9bf43e0191c9b68) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../GrassCoverErosionInwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -26,6 +26,7 @@ using Application.Ringtoets.Storage.TestUtil; using Core.Common.Base.Data; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.GrassCoverErosionInwards.Data; namespace Application.Ringtoets.Storage.Test.Create.GrassCoverErosionInwards @@ -48,7 +49,8 @@ [Test] public void Create_WithDifferentResults_ReturnsEntityWithExpectedResults( - [Values(true, false)] bool assessmentLayerOneResult, + [Values(AssessmentLayerOneState.NotAssessed, AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerOneState.Sufficient)] AssessmentLayerOneState assessmentLayerOneResult, [Values(3.2, 4.5)] double assessmentLayerThreeResult) { // Setup Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionOutwards/GrassCoverErosionOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r7ae9100ff4e61169edcefaeb01b72d492431742f -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionOutwards/GrassCoverErosionOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../GrassCoverErosionOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 7ae9100ff4e61169edcefaeb01b72d492431742f) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionOutwards/GrassCoverErosionOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../GrassCoverErosionOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -34,7 +34,8 @@ { [Test] public void Create_VariousResults_ReturnsExpectedEntity( - [Values(true, false)] bool assessmentLayerOneResult, + [Values(AssessmentLayerOneState.NotAssessed, AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerOneState.Sufficient)] AssessmentLayerOneState assessmentLayerOneResult, [Values(AssessmentLayerTwoAResult.NotCalculated, AssessmentLayerTwoAResult.Failed)] AssessmentLayerTwoAResult assessmentLayerTwoAResult, [Values(3.2, 4.5)] double assessmentLayerThreeResult ) Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverSlipOffInwards/GrassCoverSlipOffInwardsFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r7ae9100ff4e61169edcefaeb01b72d492431742f -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverSlipOffInwards/GrassCoverSlipOffInwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../GrassCoverSlipOffInwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 7ae9100ff4e61169edcefaeb01b72d492431742f) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverSlipOffInwards/GrassCoverSlipOffInwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../GrassCoverSlipOffInwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -34,7 +34,8 @@ { [Test] public void Create_VariousResults_ReturnsEntity( - [Values(true, false)] bool assessmentLayerOneResult, + [Values(AssessmentLayerOneState.NotAssessed, AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerOneState.Sufficient)] AssessmentLayerOneState assessmentLayerOneResult, [Values(AssessmentLayerTwoAResult.NotCalculated, AssessmentLayerTwoAResult.Failed)] AssessmentLayerTwoAResult assessmentLayerTwoAResult, [Values(3.2, 4.5)] double assessmentLayerThreeResult) { Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverSlipOffOutwards/GrassCoverSlipOffOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r7ae9100ff4e61169edcefaeb01b72d492431742f -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverSlipOffOutwards/GrassCoverSlipOffOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../GrassCoverSlipOffOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 7ae9100ff4e61169edcefaeb01b72d492431742f) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverSlipOffOutwards/GrassCoverSlipOffOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../GrassCoverSlipOffOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -34,7 +34,8 @@ { [Test] public void Create_VariousResults_ReturnsExpectedEntity( - [Values(true, false)] bool assessmentLayerOneResult, + [Values(AssessmentLayerOneState.NotAssessed, AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerOneState.Sufficient)] AssessmentLayerOneState assessmentLayerOneResult, [Values(AssessmentLayerTwoAResult.NotCalculated, AssessmentLayerTwoAResult.Failed)] AssessmentLayerTwoAResult assessmentLayerTwoAResult, [Values(3.2, 4.5)] double assessmentLayerThreeResult ) Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HeightStructures/HeightStructuresFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r25cb0404c9026690062e1a17b1ef5e9ecdb176f6 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HeightStructures/HeightStructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../HeightStructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 25cb0404c9026690062e1a17b1ef5e9ecdb176f6) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/HeightStructures/HeightStructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../HeightStructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -26,6 +26,7 @@ using Application.Ringtoets.Storage.TestUtil; using Core.Common.Base.Data; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Structures; using Ringtoets.HeightStructures.Data; @@ -49,7 +50,8 @@ [Test] public void Create_WithDifferentResults_ReturnsEntityWithExpectedResults( - [Values(true, false)] bool assessmentLayerOneResult, + [Values(AssessmentLayerOneState.NotAssessed, AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerOneState.Sufficient)] AssessmentLayerOneState assessmentLayerOneResult, [Values(3.2, 4.5)] double assessmentLayerThreeResult) { // Setup Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacrostabilityInwards/MacrostabilityInwardsFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -rb66269d1c3435557b993a5daa333612017f6ccfd -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacrostabilityInwards/MacrostabilityInwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../MacrostabilityInwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision b66269d1c3435557b993a5daa333612017f6ccfd) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacrostabilityInwards/MacrostabilityInwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../MacrostabilityInwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -24,6 +24,7 @@ using Application.Ringtoets.Storage.TestUtil; using Core.Common.Base.Data; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Integration.Data.StandAlone.SectionResults; namespace Application.Ringtoets.Storage.Test.Create.MacrostabilityInwards @@ -33,7 +34,8 @@ { [Test] public void Create_WithDifferentResults_ReturnsEntityWithExpectedResults( - [Values(true, false)] bool assessmentLayerOneResult, + [Values(AssessmentLayerOneState.NotAssessed, AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerOneState.Sufficient)] AssessmentLayerOneState assessmentLayerOneResult, [Values(0.2, 0.523)] double assessmentLayerTwoAResult, [Values(3.2, 4.5)] double assessmentLayerThreeResult) { Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacrostabilityOutwards/MacrostabilityOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r7ae9100ff4e61169edcefaeb01b72d492431742f -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacrostabilityOutwards/MacrostabilityOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../MacrostabilityOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 7ae9100ff4e61169edcefaeb01b72d492431742f) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/MacrostabilityOutwards/MacrostabilityOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs (.../MacrostabilityOutwardsFailureMechanismSectionResultCreateExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -24,6 +24,7 @@ using Application.Ringtoets.Storage.TestUtil; using Core.Common.Base.Data; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Integration.Data.StandAlone.SectionResults; namespace Application.Ringtoets.Storage.Test.Create.MacrostabilityOutwards @@ -33,7 +34,8 @@ { [Test] public void Create_WithDifferentResults_ReturnsEntityWithExpectedResults( - [Values(true, false)] bool assessmentLayerOneResult, + [Values(AssessmentLayerOneState.NotAssessed, AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerOneState.Sufficient)] AssessmentLayerOneState assessmentLayerOneResult, [Values(0.2, 0.523)] double assessmentLayerTwoAResult, [Values(3.2, 4.5)] double assessmentLayerThreeResult) { Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Microstability/MicrostabilityFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r7ae9100ff4e61169edcefaeb01b72d492431742f -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Microstability/MicrostabilityFailureMechanismSectionResultCreateExtensionsTest.cs (.../MicrostabilityFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 7ae9100ff4e61169edcefaeb01b72d492431742f) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Microstability/MicrostabilityFailureMechanismSectionResultCreateExtensionsTest.cs (.../MicrostabilityFailureMechanismSectionResultCreateExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -34,7 +34,8 @@ { [Test] public void Create_WithDifferentResults_ReturnsEntityWithExpectedResults( - [Values(true, false)] bool assessmentLayerOneResult, + [Values(AssessmentLayerOneState.NotAssessed, AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerOneState.Sufficient)] AssessmentLayerOneState assessmentLayerOneResult, [Values(AssessmentLayerTwoAResult.NotCalculated, AssessmentLayerTwoAResult.Failed)] AssessmentLayerTwoAResult assessmentLayerTwoAResult, [Values(3.2, 4.5)] double assessmentLayerThreeResult) { Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r7ae9100ff4e61169edcefaeb01b72d492431742f -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingFailureMechanismSectionResultCreateExtensionsTest.cs (.../PipingFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 7ae9100ff4e61169edcefaeb01b72d492431742f) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/Piping/PipingFailureMechanismSectionResultCreateExtensionsTest.cs (.../PipingFailureMechanismSectionResultCreateExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -24,6 +24,7 @@ using Application.Ringtoets.Storage.TestUtil; using Core.Common.Base.Data; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Piping.Data; namespace Application.Ringtoets.Storage.Test.Create.Piping @@ -33,7 +34,8 @@ { [Test] public void Create_WithDifferentResults_ReturnsEntityWithExpectedResults( - [Values(true, false)] bool assessmentLayerOneResult, + [Values(AssessmentLayerOneState.NotAssessed, AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerOneState.Sufficient)] AssessmentLayerOneState assessmentLayerOneResult, [Values(3.2, 4.5)] double assessmentLayerThreeResult) { // Setup Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PipingStructure/PipingStructureFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r7ae9100ff4e61169edcefaeb01b72d492431742f -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PipingStructure/PipingStructureFailureMechanismSectionResultCreateExtensionsTest.cs (.../PipingStructureFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 7ae9100ff4e61169edcefaeb01b72d492431742f) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PipingStructure/PipingStructureFailureMechanismSectionResultCreateExtensionsTest.cs (.../PipingStructureFailureMechanismSectionResultCreateExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -34,7 +34,8 @@ { [Test] public void Create_WithDifferentResults_ReturnsEntityWithExpectedResults( - [Values(true, false)] bool assessmentLayerOneResult, + [Values(AssessmentLayerOneState.NotAssessed, AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerOneState.Sufficient)] AssessmentLayerOneState assessmentLayerOneResult, [Values(AssessmentLayerTwoAResult.NotCalculated, AssessmentLayerTwoAResult.Failed)] AssessmentLayerTwoAResult assessmentLayerTwoAResult, [Values(3.2, 4.5)] double assessmentLayerThreeResult) { Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r25cb0404c9026690062e1a17b1ef5e9ecdb176f6 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../StabilityPointStructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 25cb0404c9026690062e1a17b1ef5e9ecdb176f6) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismSectionResultCreateExtensionsTest.cs (.../StabilityPointStructuresFailureMechanismSectionResultCreateExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -26,6 +26,7 @@ using Application.Ringtoets.Storage.TestUtil; using Core.Common.Base.Data; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Structures; using Ringtoets.StabilityPointStructures.Data; @@ -49,7 +50,8 @@ [Test] public void Create_VariousResults_ReturnsEntity( - [Values(true, false)] bool assessmentLayerOneResult, + [Values(AssessmentLayerOneState.NotAssessed, AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerOneState.Sufficient)] AssessmentLayerOneState assessmentLayerOneResult, [Values(3.2, 4.5)] double assessmentLayerThreeResult) { // Setup Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r7ae9100ff4e61169edcefaeb01b72d492431742f -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs (.../StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 7ae9100ff4e61169edcefaeb01b72d492431742f) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityStoneCover/StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs (.../StabilityStoneCoverFailureMechanismSectionResultCreateExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -36,7 +36,7 @@ public void Create_ValidData_ReturnsEntityEqualData() { // Setup - const bool assessmentLayerOneResult = false; + const AssessmentLayerOneState assessmentLayerOneResult = AssessmentLayerOneState.NeedsDetailedAssessment; AssessmentLayerTwoAResult assessmentLayerTwoAResult = AssessmentLayerTwoAResult.Failed; var assessmentLayerThreeResult = 3.2; var sectionResult = new StabilityStoneCoverFailureMechanismSectionResult(new TestFailureMechanismSection()) Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StrengthStabilityLengthwise/StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r7ae9100ff4e61169edcefaeb01b72d492431742f -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StrengthStabilityLengthwise/StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultCreateExtensionsTest.cs (.../StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 7ae9100ff4e61169edcefaeb01b72d492431742f) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StrengthStabilityLengthwise/StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultCreateExtensionsTest.cs (.../StrengthStabilityLengthwiseConstructionFailureMechanismSectionResultCreateExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -24,6 +24,7 @@ using Application.Ringtoets.Storage.TestUtil; using Core.Common.Base.Data; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Integration.Data.StandAlone.SectionResults; namespace Application.Ringtoets.Storage.Test.Create.StrengthStabilityLengthwise @@ -33,7 +34,8 @@ { [Test] public void Create_VariousResults_ReturnsEntity( - [Values(true, false)] bool assessmentLayerOneResult, + [Values(AssessmentLayerOneState.NotAssessed, AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerOneState.Sufficient)] AssessmentLayerOneState assessmentLayerOneResult, [Values(3.2, 4.5)] double assessmentLayerThreeResult) { // Setup Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/TechnicalInnovation/TechnicalInnovationFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r7ae9100ff4e61169edcefaeb01b72d492431742f -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/TechnicalInnovation/TechnicalInnovationFailureMechanismSectionResultCreateExtensionsTest.cs (.../TechnicalInnovationFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 7ae9100ff4e61169edcefaeb01b72d492431742f) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/TechnicalInnovation/TechnicalInnovationFailureMechanismSectionResultCreateExtensionsTest.cs (.../TechnicalInnovationFailureMechanismSectionResultCreateExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -24,6 +24,7 @@ using Application.Ringtoets.Storage.TestUtil; using Core.Common.Base.Data; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Integration.Data.StandAlone.SectionResults; namespace Application.Ringtoets.Storage.Test.Create.TechnicalInnovation @@ -33,7 +34,8 @@ { [Test] public void Create_WithDifferentResults_ReturnsEntityWithExpectedResults( - [Values(true, false)] bool assessmentLayerOneResult, + [Values(AssessmentLayerOneState.NotAssessed, AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerOneState.Sufficient)] AssessmentLayerOneState assessmentLayerOneResult, [Values(3.2, 4.5)] double assessmentLayerThreeResult) { // Setup Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaterPressureAsphaltCover/WaterPressureAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r7ae9100ff4e61169edcefaeb01b72d492431742f -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaterPressureAsphaltCover/WaterPressureAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs (.../WaterPressureAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 7ae9100ff4e61169edcefaeb01b72d492431742f) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaterPressureAsphaltCover/WaterPressureAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs (.../WaterPressureAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -24,6 +24,7 @@ using Application.Ringtoets.Storage.TestUtil; using Core.Common.Base.Data; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Integration.Data.StandAlone.SectionResults; namespace Application.Ringtoets.Storage.Test.Create.WaterPressureAsphaltCover @@ -33,7 +34,8 @@ { [Test] public void Create_WithDifferentResults_ReturnsEntityWithExpectedResults( - [Values(true, false)] bool assessmentLayerOneResult, + [Values(AssessmentLayerOneState.NotAssessed, AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerOneState.Sufficient)] AssessmentLayerOneState assessmentLayerOneResult, [Values(3.2, 4.5)] double assessmentLayerThreeResult ) { Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaveImpactAsphaltCover/WaveImpactAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs =================================================================== diff -u -r7ae9100ff4e61169edcefaeb01b72d492431742f -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaveImpactAsphaltCover/WaveImpactAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs (.../WaveImpactAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs) (revision 7ae9100ff4e61169edcefaeb01b72d492431742f) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/WaveImpactAsphaltCover/WaveImpactAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs (.../WaveImpactAsphaltCoverFailureMechanismSectionResultCreateExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -24,6 +24,7 @@ using Application.Ringtoets.Storage.TestUtil; using Core.Common.Base.Data; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.WaveImpactAsphaltCover.Data; namespace Application.Ringtoets.Storage.Test.Create.WaveImpactAsphaltCover @@ -33,7 +34,8 @@ { [Test] public void Create_WithDifferentResults_ReturnsEntityWithExpectedResults( - [Values(true, false)] bool assessmentLayerOneResult, + [Values(AssessmentLayerOneState.NotAssessed, AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerOneState.Sufficient)] AssessmentLayerOneState assessmentLayerOneResult, [Values(0.2, 0.523)] double assessmentLayerTwoAResult, [Values(3.2, 4.5)] double assessmentLayerThreeResult ) Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r6e33ada58f1a53a5a732c3b4e46583ad846a2983 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensionsTest.cs (.../ClosingStructuresSectionResultEntityReadExtensionsTest.cs) (revision 6e33ada58f1a53a5a732c3b4e46583ad846a2983) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ClosingStructures/ClosingStructuresSectionResultEntityReadExtensionsTest.cs (.../ClosingStructuresSectionResultEntityReadExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -26,6 +26,7 @@ using Application.Ringtoets.Storage.TestUtil; using NUnit.Framework; using Ringtoets.ClosingStructures.Data; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Structures; namespace Application.Ringtoets.Storage.Test.Read.ClosingStructures @@ -63,9 +64,11 @@ } [Test] - [TestCase(true)] - [TestCase(false)] - public void Read_WithDecimalParameterValues_ReturnClosingStructuresSectionResultWithDoubleParameterValues(bool layerOne) + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + [TestCase(AssessmentLayerOneState.Sufficient)] + public void Read_WithDecimalParameterValues_ReturnClosingStructuresSectionResultWithDoubleParameterValues( + AssessmentLayerOneState layerOne) { // Setup var random = new Random(21); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/DuneErosion/DuneErosionSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -rfd75ff7d1794c6a64fd3ce1aa1f159effba2e102 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/DuneErosion/DuneErosionSectionResultEntityReadExtensionsTest.cs (.../DuneErosionSectionResultEntityReadExtensionsTest.cs) (revision fd75ff7d1794c6a64fd3ce1aa1f159effba2e102) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/DuneErosion/DuneErosionSectionResultEntityReadExtensionsTest.cs (.../DuneErosionSectionResultEntityReadExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -48,10 +48,11 @@ } [Test] - [TestCase(true, AssessmentLayerTwoAResult.Failed)] - [TestCase(false, AssessmentLayerTwoAResult.Successful)] - [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithDecimalParameterValues_ReturnDuneErosionSectionResultWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + [TestCase(AssessmentLayerOneState.NotAssessed, AssessmentLayerTwoAResult.Failed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment, AssessmentLayerTwoAResult.Successful)] + [TestCase(AssessmentLayerOneState.Sufficient, AssessmentLayerTwoAResult.Failed)] + public void Read_WithDecimalParameterValues_ReturnDuneErosionSectionResultWithDoubleParameterValues( + AssessmentLayerOneState layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var random = new Random(21); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionInwards/GrassCoverErosionInwardsSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r97018b4e8e9cd81438e8fd0d111d889e20946617 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionInwards/GrassCoverErosionInwardsSectionResultEntityReadExtensionsTest.cs (.../GrassCoverErosionInwardsSectionResultEntityReadExtensionsTest.cs) (revision 97018b4e8e9cd81438e8fd0d111d889e20946617) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionInwards/GrassCoverErosionInwardsSectionResultEntityReadExtensionsTest.cs (.../GrassCoverErosionInwardsSectionResultEntityReadExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -25,6 +25,7 @@ using Application.Ringtoets.Storage.Read.GrassCoverErosionInwards; using Application.Ringtoets.Storage.TestUtil; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.GrassCoverErosionInwards.Data; namespace Application.Ringtoets.Storage.Test.Read.GrassCoverErosionInwards @@ -61,9 +62,10 @@ } [Test] - [TestCase(true)] - [TestCase(false)] - public void Read_WithDoubleValues_ReturnSectionResultWithDoubleValues(bool layerOne) + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + [TestCase(AssessmentLayerOneState.Sufficient)] + public void Read_WithDoubleValues_ReturnSectionResultWithDoubleValues(AssessmentLayerOneState layerOne) { // Setup var random = new Random(21); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionOutwards/GrassCoverErosionOutwardsSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -ra14d1309ecf82ff5b0385a2f6e3b2c4a216a4184 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionOutwards/GrassCoverErosionOutwardsSectionResultEntityReadExtensionsTest.cs (.../GrassCoverErosionOutwardsSectionResultEntityReadExtensionsTest.cs) (revision a14d1309ecf82ff5b0385a2f6e3b2c4a216a4184) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverErosionOutwards/GrassCoverErosionOutwardsSectionResultEntityReadExtensionsTest.cs (.../GrassCoverErosionOutwardsSectionResultEntityReadExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -48,10 +48,11 @@ } [Test] - [TestCase(true, AssessmentLayerTwoAResult.Failed)] - [TestCase(false, AssessmentLayerTwoAResult.Successful)] - [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithDecimalParameterValues_ReturnSectionResultWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + [TestCase(AssessmentLayerOneState.NotAssessed, AssessmentLayerTwoAResult.Failed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment, AssessmentLayerTwoAResult.Successful)] + [TestCase(AssessmentLayerOneState.Sufficient, AssessmentLayerTwoAResult.Failed)] + public void Read_WithDecimalParameterValues_ReturnSectionResultWithDoubleParameterValues( + AssessmentLayerOneState layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var random = new Random(21); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverSlipOffInwardsSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r97018b4e8e9cd81438e8fd0d111d889e20946617 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverSlipOffInwardsSectionResultEntityReadExtensionsTest.cs (.../GrassCoverSlipOffInwardsSectionResultEntityReadExtensionsTest.cs) (revision 97018b4e8e9cd81438e8fd0d111d889e20946617) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverSlipOffInwardsSectionResultEntityReadExtensionsTest.cs (.../GrassCoverSlipOffInwardsSectionResultEntityReadExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -47,10 +47,11 @@ } [Test] - [TestCase(true, AssessmentLayerTwoAResult.Failed)] - [TestCase(false, AssessmentLayerTwoAResult.Successful)] - [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithDecimalParameterValues_ReturnGrassCoverSlipOffInwardsSectionResultWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + [TestCase(AssessmentLayerOneState.NotAssessed, AssessmentLayerTwoAResult.Failed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment, AssessmentLayerTwoAResult.Successful)] + [TestCase(AssessmentLayerOneState.Sufficient, AssessmentLayerTwoAResult.Failed)] + public void Read_WithDecimalParameterValues_ReturnGrassCoverSlipOffInwardsSectionResultWithDoubleParameterValues( + AssessmentLayerOneState layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var random = new Random(21); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverSlipOffOutwardsSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r97018b4e8e9cd81438e8fd0d111d889e20946617 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverSlipOffOutwardsSectionResultEntityReadExtensionsTest.cs (.../GrassCoverSlipOffOutwardsSectionResultEntityReadExtensionsTest.cs) (revision 97018b4e8e9cd81438e8fd0d111d889e20946617) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/GrassCoverSlipOffOutwardsSectionResultEntityReadExtensionsTest.cs (.../GrassCoverSlipOffOutwardsSectionResultEntityReadExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -47,10 +47,11 @@ } [Test] - [TestCase(true, AssessmentLayerTwoAResult.Failed)] - [TestCase(false, AssessmentLayerTwoAResult.Successful)] - [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithDecimalParameterValues_ReturnGrassCoverSlipOffOutwardsSectionResultWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + [TestCase(AssessmentLayerOneState.NotAssessed, AssessmentLayerTwoAResult.Failed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment, AssessmentLayerTwoAResult.Successful)] + [TestCase(AssessmentLayerOneState.Sufficient, AssessmentLayerTwoAResult.Failed)] + public void Read_WithDecimalParameterValues_ReturnGrassCoverSlipOffOutwardsSectionResultWithDoubleParameterValues( + AssessmentLayerOneState layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var random = new Random(21); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructures/HeightStructuresSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -ree999e492a57d9bbb3777754651e9f4722611075 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructures/HeightStructuresSectionResultEntityReadExtensionsTest.cs (.../HeightStructuresSectionResultEntityReadExtensionsTest.cs) (revision ee999e492a57d9bbb3777754651e9f4722611075) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HeightStructures/HeightStructuresSectionResultEntityReadExtensionsTest.cs (.../HeightStructuresSectionResultEntityReadExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -25,6 +25,7 @@ using Application.Ringtoets.Storage.Read.HeightStructures; using Application.Ringtoets.Storage.TestUtil; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Structures; using Ringtoets.HeightStructures.Data; @@ -63,9 +64,11 @@ } [Test] - [TestCase(true)] - [TestCase(false)] - public void Read_WithDecimalParameterValues_ReturnHeightStructuresSectionResultWithDoubleParameterValues(bool layerOne) + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + [TestCase(AssessmentLayerOneState.Sufficient)] + public void Read_WithDecimalParameterValues_ReturnHeightStructuresSectionResultWithDoubleParameterValues( + AssessmentLayerOneState layerOne) { // Setup var random = new Random(21); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacrostabilityInwardsSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r97018b4e8e9cd81438e8fd0d111d889e20946617 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacrostabilityInwardsSectionResultEntityReadExtensionsTest.cs (.../MacrostabilityInwardsSectionResultEntityReadExtensionsTest.cs) (revision 97018b4e8e9cd81438e8fd0d111d889e20946617) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacrostabilityInwardsSectionResultEntityReadExtensionsTest.cs (.../MacrostabilityInwardsSectionResultEntityReadExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -24,6 +24,7 @@ using Application.Ringtoets.Storage.Read; using Application.Ringtoets.Storage.TestUtil; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Integration.Data.StandAlone.SectionResults; namespace Application.Ringtoets.Storage.Test.Read @@ -46,9 +47,11 @@ } [Test] - [TestCase(true)] - [TestCase(false)] - public void Read_WithDecimalParameterValues_ReturnMacrostabilityInwardsSectionResultWithDoubleParameterValues(bool layerOne) + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + [TestCase(AssessmentLayerOneState.Sufficient)] + public void Read_WithDecimalParameterValues_ReturnMacrostabilityInwardsSectionResultWithDoubleParameterValues( + AssessmentLayerOneState layerOne) { // Setup var random = new Random(21); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacrostabilityOutwardsSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r97018b4e8e9cd81438e8fd0d111d889e20946617 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacrostabilityOutwardsSectionResultEntityReadExtensionsTest.cs (.../MacrostabilityOutwardsSectionResultEntityReadExtensionsTest.cs) (revision 97018b4e8e9cd81438e8fd0d111d889e20946617) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MacrostabilityOutwardsSectionResultEntityReadExtensionsTest.cs (.../MacrostabilityOutwardsSectionResultEntityReadExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -24,6 +24,7 @@ using Application.Ringtoets.Storage.Read; using Application.Ringtoets.Storage.TestUtil; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Integration.Data.StandAlone.SectionResults; namespace Application.Ringtoets.Storage.Test.Read @@ -46,9 +47,11 @@ } [Test] - [TestCase(true)] - [TestCase(false)] - public void Read_WithDecimalParameterValues_ReturnMacrostabilityOutwardsSectionResultWithDoubleParameterValues(bool layerOne) + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + [TestCase(AssessmentLayerOneState.Sufficient)] + public void Read_WithDecimalParameterValues_ReturnMacrostabilityOutwardsSectionResultWithDoubleParameterValues( + AssessmentLayerOneState layerOne) { // Setup var random = new Random(21); @@ -78,9 +81,11 @@ } [Test] - [TestCase(true)] - [TestCase(false)] - public void Read_WithNullLayerTwoA_ReturnMacrostabilityOutwardsSectionResultWithNullParameters(bool layerOne) + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + [TestCase(AssessmentLayerOneState.Sufficient)] + public void Read_WithNullLayerTwoA_ReturnMacrostabilityOutwardsSectionResultWithNullParameters( + AssessmentLayerOneState layerOne) { // Setup var collector = new ReadConversionCollector(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MicrostabilitySectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r97018b4e8e9cd81438e8fd0d111d889e20946617 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MicrostabilitySectionResultEntityReadExtensionsTest.cs (.../MicrostabilitySectionResultEntityReadExtensionsTest.cs) (revision 97018b4e8e9cd81438e8fd0d111d889e20946617) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/MicrostabilitySectionResultEntityReadExtensionsTest.cs (.../MicrostabilitySectionResultEntityReadExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -47,10 +47,11 @@ } [Test] - [TestCase(true, AssessmentLayerTwoAResult.Failed)] - [TestCase(false, AssessmentLayerTwoAResult.Successful)] - [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithDecimalParameterValues_ReturnMicrostabilitySectionResultWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + [TestCase(AssessmentLayerOneState.NotAssessed, AssessmentLayerTwoAResult.Failed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment, AssessmentLayerTwoAResult.Successful)] + [TestCase(AssessmentLayerOneState.Sufficient, AssessmentLayerTwoAResult.Failed)] + public void Read_WithDecimalParameterValues_ReturnMicrostabilitySectionResultWithDoubleParameterValues( + AssessmentLayerOneState layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var random = new Random(21); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/PipingSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -rb3af39ba024b8e12fe238d85130697255db28c59 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/PipingSectionResultEntityReadExtensionsTest.cs (.../PipingSectionResultEntityReadExtensionsTest.cs) (revision b3af39ba024b8e12fe238d85130697255db28c59) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/Piping/PipingSectionResultEntityReadExtensionsTest.cs (.../PipingSectionResultEntityReadExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -25,6 +25,7 @@ using Application.Ringtoets.Storage.Read.Piping; using Application.Ringtoets.Storage.TestUtil; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Piping.Data; namespace Application.Ringtoets.Storage.Test.Read.Piping @@ -47,9 +48,11 @@ } [Test] - [TestCase(true)] - [TestCase(false)] - public void Read_WithDecimalParameterValues_ReturnPipingSectionResultWithDoubleParameterValues(bool layerOne) + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + [TestCase(AssessmentLayerOneState.Sufficient)] + public void Read_WithDecimalParameterValues_ReturnPipingSectionResultWithDoubleParameterValues( + AssessmentLayerOneState layerOne) { // Setup var random = new Random(21); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/PipingStructures/PipingStructureSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r6e33ada58f1a53a5a732c3b4e46583ad846a2983 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/PipingStructures/PipingStructureSectionResultEntityReadExtensionsTest.cs (.../PipingStructureSectionResultEntityReadExtensionsTest.cs) (revision 6e33ada58f1a53a5a732c3b4e46583ad846a2983) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/PipingStructures/PipingStructureSectionResultEntityReadExtensionsTest.cs (.../PipingStructureSectionResultEntityReadExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -48,10 +48,11 @@ } [Test] - [TestCase(true, AssessmentLayerTwoAResult.Failed)] - [TestCase(false, AssessmentLayerTwoAResult.Successful)] - [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithDecimalParameterValues_ReturnPipingStructureSectionResultWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + [TestCase(AssessmentLayerOneState.NotAssessed, AssessmentLayerTwoAResult.Failed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment, AssessmentLayerTwoAResult.Successful)] + [TestCase(AssessmentLayerOneState.Sufficient, AssessmentLayerTwoAResult.Failed)] + public void Read_WithDecimalParameterValues_ReturnPipingStructureSectionResultWithDoubleParameterValues( + AssessmentLayerOneState layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var random = new Random(21); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityPointStructures/StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r6e33ada58f1a53a5a732c3b4e46583ad846a2983 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityPointStructures/StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs (.../StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs) (revision 6e33ada58f1a53a5a732c3b4e46583ad846a2983) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityPointStructures/StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs (.../StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -25,6 +25,7 @@ using Application.Ringtoets.Storage.Read.StabilityPointStructures; using Application.Ringtoets.Storage.TestUtil; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Structures; using Ringtoets.StabilityPointStructures.Data; @@ -63,9 +64,11 @@ } [Test] - [TestCase(true)] - [TestCase(false)] - public void Read_WithDecimalParameterValues_ReturnSectionResultWithDoubleParameterValues(bool layerOne) + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + [TestCase(AssessmentLayerOneState.Sufficient)] + public void Read_WithDecimalParameterValues_ReturnSectionResultWithDoubleParameterValues( + AssessmentLayerOneState layerOne) { // Setup var random = new Random(21); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityStoneCover/StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -ra14d1309ecf82ff5b0385a2f6e3b2c4a216a4184 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityStoneCover/StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs (.../StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs) (revision a14d1309ecf82ff5b0385a2f6e3b2c4a216a4184) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StabilityStoneCover/StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs (.../StabilityStoneCoverSectionResultEntityReadExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -48,10 +48,11 @@ } [Test] - [TestCase(true, AssessmentLayerTwoAResult.Failed)] - [TestCase(false, AssessmentLayerTwoAResult.Successful)] - [TestCase(false, AssessmentLayerTwoAResult.Failed)] - public void Read_WithDecimalParameterValues_ReturnSectionResultWithDoubleParameterValues(bool layerOne, AssessmentLayerTwoAResult layerTwoA) + [TestCase(AssessmentLayerOneState.NotAssessed, AssessmentLayerTwoAResult.Failed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment, AssessmentLayerTwoAResult.Successful)] + [TestCase(AssessmentLayerOneState.Sufficient, AssessmentLayerTwoAResult.Failed)] + public void Read_WithDecimalParameterValues_ReturnSectionResultWithDoubleParameterValues( + AssessmentLayerOneState layerOne, AssessmentLayerTwoAResult layerTwoA) { // Setup var random = new Random(21); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StrengthStabilityLengthwiseConstructionSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -rb3af39ba024b8e12fe238d85130697255db28c59 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StrengthStabilityLengthwiseConstructionSectionResultEntityReadExtensionsTest.cs (.../StrengthStabilityLengthwiseConstructionSectionResultEntityReadExtensionsTest.cs) (revision b3af39ba024b8e12fe238d85130697255db28c59) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/StrengthStabilityLengthwiseConstructionSectionResultEntityReadExtensionsTest.cs (.../StrengthStabilityLengthwiseConstructionSectionResultEntityReadExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -24,6 +24,7 @@ using Application.Ringtoets.Storage.Read; using Application.Ringtoets.Storage.TestUtil; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Integration.Data.StandAlone.SectionResults; namespace Application.Ringtoets.Storage.Test.Read @@ -46,9 +47,11 @@ } [Test] - [TestCase(true, TestName = "DecimalValues_ReturnsStrengthStabilityLengthwiseConstructionSectionResultWithDoubleParameters(true)")] - [TestCase(false, TestName = "DecimalValues_ReturnsStrengthStabilityLengthwiseConstructionSectionResultWithDoubleParameters(false)")] - public void Read_WithDecimalParameterValues_ReturnStrengthStabilityLengthwiseConstructionSectionResultWithDoubleParameterValues(bool layerOne) + [TestCase(AssessmentLayerOneState.NotAssessed, TestName = "DecimalValues_ReturnsStrengthStabilityLengthwiseConstructionSectionResultWithDoubleParameters(NotAssessed)")] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment, TestName = "DecimalValues_ReturnsStrengthStabilityLengthwiseConstructionSectionResultWithDoubleParameters(NeedsDetailedAssessment)")] + [TestCase(AssessmentLayerOneState.Sufficient, TestName = "DecimalValues_ReturnsStrengthStabilityLengthwiseConstructionSectionResultWithDoubleParameters(Sufficient)")] + public void Read_WithDecimalParameterValues_ReturnStrengthStabilityLengthwiseConstructionSectionResultWithDoubleParameterValues( + AssessmentLayerOneState layerOne) { // Setup var random = new Random(21); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/TechnicalInnovationSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -rb3af39ba024b8e12fe238d85130697255db28c59 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/TechnicalInnovationSectionResultEntityReadExtensionsTest.cs (.../TechnicalInnovationSectionResultEntityReadExtensionsTest.cs) (revision b3af39ba024b8e12fe238d85130697255db28c59) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/TechnicalInnovationSectionResultEntityReadExtensionsTest.cs (.../TechnicalInnovationSectionResultEntityReadExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -24,6 +24,7 @@ using Application.Ringtoets.Storage.Read; using Application.Ringtoets.Storage.TestUtil; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Integration.Data.StandAlone.SectionResults; namespace Application.Ringtoets.Storage.Test.Read @@ -46,9 +47,11 @@ } [Test] - [TestCase(true)] - [TestCase(false)] - public void Read_WithDecimalParameterValues_ReturnTechnicalInnovationSectionResultWithDoubleParameterValues(bool layerOne) + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + [TestCase(AssessmentLayerOneState.Sufficient)] + public void Read_WithDecimalParameterValues_ReturnTechnicalInnovationSectionResultWithDoubleParameterValues( + AssessmentLayerOneState layerOne) { // Setup var random = new Random(21); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/WaterPressureAsphaltCoverSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -rb3af39ba024b8e12fe238d85130697255db28c59 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/WaterPressureAsphaltCoverSectionResultEntityReadExtensionsTest.cs (.../WaterPressureAsphaltCoverSectionResultEntityReadExtensionsTest.cs) (revision b3af39ba024b8e12fe238d85130697255db28c59) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/WaterPressureAsphaltCoverSectionResultEntityReadExtensionsTest.cs (.../WaterPressureAsphaltCoverSectionResultEntityReadExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -24,6 +24,7 @@ using Application.Ringtoets.Storage.Read; using Application.Ringtoets.Storage.TestUtil; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Integration.Data.StandAlone.SectionResults; namespace Application.Ringtoets.Storage.Test.Read @@ -46,9 +47,11 @@ } [Test] - [TestCase(true)] - [TestCase(false)] - public void Read_WithDecimalParameterValues_ReturnWaterPressureAsphaltCoverSectionResultWithDoubleParameterValues(bool layerOne) + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + [TestCase(AssessmentLayerOneState.Sufficient)] + public void Read_WithDecimalParameterValues_ReturnWaterPressureAsphaltCoverSectionResultWithDoubleParameterValues( + AssessmentLayerOneState layerOne) { // Setup var random = new Random(21); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/WaveImpactAsphaltCover/WaveImpactAsphaltCoverSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -ra14d1309ecf82ff5b0385a2f6e3b2c4a216a4184 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/WaveImpactAsphaltCover/WaveImpactAsphaltCoverSectionResultEntityReadExtensionsTest.cs (.../WaveImpactAsphaltCoverSectionResultEntityReadExtensionsTest.cs) (revision a14d1309ecf82ff5b0385a2f6e3b2c4a216a4184) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/WaveImpactAsphaltCover/WaveImpactAsphaltCoverSectionResultEntityReadExtensionsTest.cs (.../WaveImpactAsphaltCoverSectionResultEntityReadExtensionsTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -25,6 +25,7 @@ using Application.Ringtoets.Storage.Read.WaveImpactAsphaltCover; using Application.Ringtoets.Storage.TestUtil; using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.WaveImpactAsphaltCover.Data; namespace Application.Ringtoets.Storage.Test.Read.WaveImpactAsphaltCover @@ -47,9 +48,10 @@ } [Test] - [TestCase(true)] - [TestCase(false)] - public void Read_WithDecimalParameterValues_ReturnSectionResultWithDoubleParameterValues(bool layerOne) + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + [TestCase(AssessmentLayerOneState.Sufficient)] + public void Read_WithDecimalParameterValues_ReturnSectionResultWithDoubleParameterValues(AssessmentLayerOneState layerOne) { // Setup var random = new Random(21); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs =================================================================== diff -u -r11d42ab635dac57e2decba16eaf672da35ee8580 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision 11d42ab635dac57e2decba16eaf672da35ee8580) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -159,7 +159,7 @@ var random = new Random(21); foreach (var sectionResult in sectionResults) { - sectionResult.AssessmentLayerOne = random.NextBoolean(); + sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); } } @@ -169,7 +169,7 @@ var random = new Random(21); foreach (var sectionResult in sectionResults) { - sectionResult.AssessmentLayerOne = random.NextBoolean(); + sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); } } @@ -179,7 +179,7 @@ var random = new Random(21); foreach (var sectionResult in sectionResults) { - sectionResult.AssessmentLayerOne = random.NextBoolean(); + sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); } } @@ -189,7 +189,7 @@ var random = new Random(21); foreach (var sectionResult in sectionResults) { - sectionResult.AssessmentLayerOne = random.NextBoolean(); + sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); sectionResult.AssessmentLayerTwoA = (RoundedDouble) random.NextDouble(); sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); } @@ -200,7 +200,7 @@ var random = new Random(21); foreach (var sectionResult in sectionResults) { - sectionResult.AssessmentLayerOne = random.NextBoolean(); + sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); sectionResult.AssessmentLayerTwoA = (RoundedDouble) random.NextDouble(); sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); } @@ -213,7 +213,7 @@ { var randomLayer2AResult = (AssessmentLayerTwoAResult) random.Next(0, Enum.GetValues(typeof(AssessmentLayerTwoAResult)).Length); - sectionResult.AssessmentLayerOne = random.NextBoolean(); + sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); sectionResult.AssessmentLayerTwoA = randomLayer2AResult; sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); } @@ -226,7 +226,7 @@ { var randomLayer2AResult = (AssessmentLayerTwoAResult) random.Next(0, Enum.GetValues(typeof(AssessmentLayerTwoAResult)).Length); - sectionResult.AssessmentLayerOne = random.NextBoolean(); + sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); sectionResult.AssessmentLayerTwoA = randomLayer2AResult; sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); } @@ -239,7 +239,7 @@ { var randomLayer2AResult = (AssessmentLayerTwoAResult) random.Next(0, Enum.GetValues(typeof(AssessmentLayerTwoAResult)).Length); - sectionResult.AssessmentLayerOne = random.NextBoolean(); + sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); sectionResult.AssessmentLayerTwoA = randomLayer2AResult; sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); } @@ -252,7 +252,7 @@ { var randomLayer2AResult = (AssessmentLayerTwoAResult) random.Next(0, Enum.GetValues(typeof(AssessmentLayerTwoAResult)).Length); - sectionResult.AssessmentLayerOne = random.NextBoolean(); + sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); sectionResult.AssessmentLayerTwoA = randomLayer2AResult; sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); } @@ -265,7 +265,7 @@ { var randomLayer2AResult = (AssessmentLayerTwoAResult) random.Next(0, Enum.GetValues(typeof(AssessmentLayerTwoAResult)).Length); - sectionResult.AssessmentLayerOne = random.NextBoolean(); + sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); sectionResult.AssessmentLayerTwoA = randomLayer2AResult; sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); } @@ -340,6 +340,12 @@ return hydraulicBoundaryDatabase; } + private static AssessmentLayerOneState GetAssessmentLayerOneState() + { + var random = new Random(21); + return (AssessmentLayerOneState)random.Next(0, Enum.GetValues(typeof(AssessmentLayerOneState)).Length); + } + #region StabilityPointStructures FailureMechanism private static void ConfigureStabilityPointStructuresFailureMechanism(StabilityPointStructuresFailureMechanism failureMechanism, @@ -411,7 +417,7 @@ var firstSectionResultHasCalculation = false; foreach (var sectionResult in sectionResults) { - sectionResult.AssessmentLayerOne = random.NextBoolean(); + sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); if (!firstSectionResultHasCalculation) { @@ -489,7 +495,7 @@ var firstSectionResultHasCalculation = false; foreach (var sectionResult in sectionResults) { - sectionResult.AssessmentLayerOne = random.NextBoolean(); + sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); if (!firstSectionResultHasCalculation) { @@ -554,7 +560,7 @@ var firstSectionResultHasCalculation = false; foreach (var sectionResult in sectionResults) { - sectionResult.AssessmentLayerOne = random.NextBoolean(); + sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); if (!firstSectionResultHasCalculation) { @@ -721,7 +727,7 @@ var random = new Random(21); foreach (var sectionResult in sectionResults) { - sectionResult.AssessmentLayerOne = random.NextBoolean(); + sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); } } @@ -854,7 +860,7 @@ var firstSectionResultHasCalculation = false; foreach (var sectionResult in sectionResults) { - sectionResult.AssessmentLayerOne = random.NextBoolean(); + sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); if (!firstSectionResultHasCalculation) { @@ -949,7 +955,7 @@ { var randomLayer2AResult = (AssessmentLayerTwoAResult) random.Next(0, Enum.GetValues(typeof(AssessmentLayerTwoAResult)).Length); - sectionResult.AssessmentLayerOne = random.NextBoolean(); + sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); sectionResult.AssessmentLayerTwoA = randomLayer2AResult; sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); } @@ -1038,7 +1044,7 @@ { var randomLayer2AResult = (AssessmentLayerTwoAResult) random.Next(0, Enum.GetValues(typeof(AssessmentLayerTwoAResult)).Length); - sectionResult.AssessmentLayerOne = random.NextBoolean(); + sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); sectionResult.AssessmentLayerTwoA = randomLayer2AResult; sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); } @@ -1121,7 +1127,7 @@ var random = new Random(21); foreach (var sectionResult in sectionResults) { - sectionResult.AssessmentLayerOne = random.NextBoolean(); + sectionResult.AssessmentLayerOne = GetAssessmentLayerOneState(); sectionResult.AssessmentLayerTwoA = (RoundedDouble) random.NextDouble(); sectionResult.AssessmentLayerThree = (RoundedDouble) random.NextDouble(); } Index: Ringtoets.sln =================================================================== diff -u -rdd2e9e86561716333a291a080b67c0dc25da2b10 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets.sln (.../Ringtoets.sln) (revision dd2e9e86561716333a291a080b67c0dc25da2b10) +++ Ringtoets.sln (.../Ringtoets.sln) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -1164,6 +1164,10 @@ {C90B77DA-E421-43CC-B82E-529651BC21AC} = {C90B77DA-E421-43CC-B82E-529651BC21AC} EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ringtoets.Common.Forms.TestUtil", "Ringtoets\Common\test\Ringtoets.Common.Forms.TestUtil\Ringtoets.Common.Forms.TestUtil.csproj", "{D24FA2F7-28A7-413B-AFD3-EE10E985630B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ringtoets.Common.Forms.TestUtil.Test", "Ringtoets\Common\test\Ringtoets.Common.Forms.TestUtil.Test\Ringtoets.Common.Forms.TestUtil.Test.csproj", "{659D7F4A-18FD-4999-9886-C8BA5017955D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution CreateInstaller|x86 = CreateInstaller|x86 @@ -2921,6 +2925,22 @@ {174BA68D-6176-4AC5-8DFD-98CDD2C4D971}.Release|x86.Build.0 = Release|x86 {174BA68D-6176-4AC5-8DFD-98CDD2C4D971}.ReleaseForCodeCoverage|x86.ActiveCfg = ReleaseForCodeCoverage|x86 {174BA68D-6176-4AC5-8DFD-98CDD2C4D971}.ReleaseForCodeCoverage|x86.Build.0 = ReleaseForCodeCoverage|x86 + {D24FA2F7-28A7-413B-AFD3-EE10E985630B}.CreateInstaller|x86.ActiveCfg = Release|x86 + {D24FA2F7-28A7-413B-AFD3-EE10E985630B}.CreateInstallerWithDemoProject|x86.ActiveCfg = Release|x86 + {D24FA2F7-28A7-413B-AFD3-EE10E985630B}.Debug|x86.ActiveCfg = Debug|x86 + {D24FA2F7-28A7-413B-AFD3-EE10E985630B}.Debug|x86.Build.0 = Debug|x86 + {D24FA2F7-28A7-413B-AFD3-EE10E985630B}.Release|x86.ActiveCfg = Release|x86 + {D24FA2F7-28A7-413B-AFD3-EE10E985630B}.Release|x86.Build.0 = Release|x86 + {D24FA2F7-28A7-413B-AFD3-EE10E985630B}.ReleaseForCodeCoverage|x86.ActiveCfg = ReleaseForCodeCoverage|x86 + {D24FA2F7-28A7-413B-AFD3-EE10E985630B}.ReleaseForCodeCoverage|x86.Build.0 = ReleaseForCodeCoverage|x86 + {659D7F4A-18FD-4999-9886-C8BA5017955D}.CreateInstaller|x86.ActiveCfg = Release|x86 + {659D7F4A-18FD-4999-9886-C8BA5017955D}.CreateInstallerWithDemoProject|x86.ActiveCfg = Release|x86 + {659D7F4A-18FD-4999-9886-C8BA5017955D}.Debug|x86.ActiveCfg = Debug|x86 + {659D7F4A-18FD-4999-9886-C8BA5017955D}.Debug|x86.Build.0 = Debug|x86 + {659D7F4A-18FD-4999-9886-C8BA5017955D}.Release|x86.ActiveCfg = Release|x86 + {659D7F4A-18FD-4999-9886-C8BA5017955D}.Release|x86.Build.0 = Release|x86 + {659D7F4A-18FD-4999-9886-C8BA5017955D}.ReleaseForCodeCoverage|x86.ActiveCfg = ReleaseForCodeCoverage|x86 + {659D7F4A-18FD-4999-9886-C8BA5017955D}.ReleaseForCodeCoverage|x86.Build.0 = ReleaseForCodeCoverage|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -2990,6 +3010,8 @@ {7C78463D-09B1-455C-B58E-B8EDC9FBCB60} = {B5F4F5A5-FD36-405D-ABA1-56C270207C8F} {915A3B93-38F6-4D8B-8204-BE7F4FB0043F} = {B5F4F5A5-FD36-405D-ABA1-56C270207C8F} {DEC38676-268F-4A45-BB45-D705FDF5541E} = {B5F4F5A5-FD36-405D-ABA1-56C270207C8F} + {D24FA2F7-28A7-413B-AFD3-EE10E985630B} = {B5F4F5A5-FD36-405D-ABA1-56C270207C8F} + {659D7F4A-18FD-4999-9886-C8BA5017955D} = {B5F4F5A5-FD36-405D-ABA1-56C270207C8F} {3ED34ACD-41C9-4251-81EC-7493E0BFF57D} = {F8FFD6DD-19DA-47CE-A0BD-53F4E7D8BB86} {1F0D20C2-7F04-431D-AF22-95A31FD53733} = {F8FFD6DD-19DA-47CE-A0BD-53F4E7D8BB86} {D64E4F0E-E341-496F-82B2-941AD202B4E3} = {3ED34ACD-41C9-4251-81EC-7493E0BFF57D} Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismResultView.cs =================================================================== diff -u -r4c6816a0272d6b38fb78d2d562b85248aa755e5d -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismResultView.cs (.../ClosingStructuresFailureMechanismResultView.cs) (revision 4c6816a0272d6b38fb78d2d562b85248aa755e5d) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismResultView.cs (.../ClosingStructuresFailureMechanismResultView.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -66,8 +66,6 @@ calculationGroupObserver = new RecursiveObserver( UpdateDataGridViewDataSource, c => c.Children); - - AddDataGridColumns(); } public override IFailureMechanism FailureMechanism @@ -102,16 +100,11 @@ base.Dispose(disposing); } - private void AddDataGridColumns() + protected override void AddDataGridColumns() { + base.AddDataGridColumns(); + DataGridViewControl.AddTextBoxColumn( - TypeUtils.GetMemberName(sr => sr.Name), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name, - true); - DataGridViewControl.AddCheckBoxColumn( - TypeUtils.GetMemberName(sr => sr.AssessmentLayerOne), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one); - DataGridViewControl.AddTextBoxColumn( TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a); DataGridViewControl.AddTextBoxColumn( Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Ringtoets.ClosingStructures.Forms.Test.csproj =================================================================== diff -u -rae5c573fb82f4b30350f63cb6f202ae99275f4ff -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Ringtoets.ClosingStructures.Forms.Test.csproj (.../Ringtoets.ClosingStructures.Forms.Test.csproj) (revision ae5c573fb82f4b30350f63cb6f202ae99275f4ff) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Ringtoets.ClosingStructures.Forms.Test.csproj (.../Ringtoets.ClosingStructures.Forms.Test.csproj) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -154,6 +154,10 @@ {4843D6E5-066F-4795-94F5-1D53932DD03C} Ringtoets.Common.Data.TestUtil + + {d24fa2f7-28a7-413b-afd3-ee10e985630b} + Ringtoets.Common.Forms.TestUtil + {888D4097-8BC2-4703-9FB1-8744C94D525E} Ringtoets.HydraRing.Calculation Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismResultViewTest.cs =================================================================== diff -u -rb7f496624546731a31137ae48d73c92456b1fe1d -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismResultViewTest.cs (.../ClosingStructuresFailureMechanismResultViewTest.cs) (revision b7f496624546731a31137ae48d73c92456b1fe1d) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismResultViewTest.cs (.../ClosingStructuresFailureMechanismResultViewTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -21,7 +21,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Windows.Forms; using Core.Common.Base.Data; using Core.Common.Base.Geometry; @@ -34,8 +33,8 @@ using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.Helpers; +using Ringtoets.Common.Forms.TestUtil; using Ringtoets.Common.Forms.Views; -using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.ClosingStructures.Forms.Test.Views { @@ -135,32 +134,34 @@ DataGridViewCellCollection cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); Assert.AreEqual("Section 1", cells[nameColumnIndex].FormattedValue); - Assert.IsFalse((bool) cells[assessmentLayerOneIndex].FormattedValue); + Assert.AreEqual(AssessmentLayerOneState.NotAssessed, cells[assessmentLayerOneIndex].Value); Assert.AreEqual("-", cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual("-", cells[assessmentLayerThreeIndex].FormattedValue); cells = rows[1].Cells; Assert.AreEqual(4, cells.Count); Assert.AreEqual("Section 2", cells[nameColumnIndex].FormattedValue); - Assert.IsFalse((bool) cells[assessmentLayerOneIndex].FormattedValue); + Assert.AreEqual(AssessmentLayerOneState.NotAssessed, cells[assessmentLayerOneIndex].Value); Assert.AreEqual("-", cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual("-", cells[assessmentLayerThreeIndex].FormattedValue); } } [Test] [SetCulture("nl-NL")] - [TestCase(true)] - [TestCase(false)] - public void FailureMechanismResultsView_ChangeCheckBox_DataGridViewCorrectlySyncedAndStylingSet(bool checkBoxSelected) + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + [TestCase(AssessmentLayerOneState.Sufficient)] + public void FailureMechanismResultsView_ChangeAssessmentLayerOneState_DataGridViewCorrectlySyncedAndStylingSet( + AssessmentLayerOneState assessmentLayerOneState) { // Setup using (CreateConfiguredFailureMechanismResultsView()) { var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; // Call - dataGridView.Rows[0].Cells[assessmentLayerOneIndex].Value = checkBoxSelected; + dataGridView.Rows[0].Cells[assessmentLayerOneIndex].Value = assessmentLayerOneState; // Assert var rows = dataGridView.Rows; @@ -172,32 +173,25 @@ var cellAssessmentLayerThree = cells[assessmentLayerThreeIndex]; DataGridViewCell dataGridViewCell = cells[assessmentLayerOneIndex]; - Assert.AreEqual(checkBoxSelected, (bool) dataGridViewCell.FormattedValue); + Assert.AreEqual(assessmentLayerOneState, dataGridViewCell.Value); Assert.AreEqual("-", cellAssessmentLayerTwoA.FormattedValue); Assert.AreEqual("-", cellAssessmentLayerThree.FormattedValue); Assert.IsEmpty(dataGridViewCell.ErrorText); - var cellAssessmentLayerTwoABackColor = cellAssessmentLayerTwoA.Style.BackColor; - var cellAssessmentLayerTwoAForeColor = cellAssessmentLayerTwoA.Style.ForeColor; - var cellAssessmentLayerThreeBackColor = cellAssessmentLayerThree.Style.BackColor; - var cellAssessmentLayerThreeForeColor = cellAssessmentLayerThree.Style.ForeColor; - - if (checkBoxSelected) + if (assessmentLayerOneState == AssessmentLayerOneState.Sufficient) { - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), cellAssessmentLayerTwoABackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), cellAssessmentLayerTwoAForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), cellAssessmentLayerThreeBackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), cellAssessmentLayerThreeForeColor); + DataGridViewCellTester.AssertCellIsDisabled(cellAssessmentLayerTwoA); + DataGridViewCellTester.AssertCellIsDisabled(cellAssessmentLayerThree); + + Assert.IsTrue(cellAssessmentLayerThree.ReadOnly); } else { - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), cellAssessmentLayerTwoABackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), cellAssessmentLayerTwoAForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), cellAssessmentLayerThreeBackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), cellAssessmentLayerThreeForeColor); - } + DataGridViewCellTester.AssertCellIsEnabled(cellAssessmentLayerTwoA, true); + DataGridViewCellTester.AssertCellIsEnabled(cellAssessmentLayerThree); - Assert.AreEqual(checkBoxSelected, cellAssessmentLayerThree.ReadOnly); + Assert.IsFalse(cellAssessmentLayerThree.ReadOnly); + } } } @@ -212,19 +206,13 @@ Assert.AreEqual(4, dataGridView.ColumnCount); - Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerTwoAIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerThreeIndex]); - Assert.AreEqual( - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one, - dataGridView.Columns[assessmentLayerOneIndex].HeaderText); - Assert.AreEqual( - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, - dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); - Assert.AreEqual( - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three, - dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); + Assert.AreEqual("Toetslaag 1", dataGridView.Columns[assessmentLayerOneIndex].HeaderText); + Assert.AreEqual("Toetslaag 2a", dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); + Assert.AreEqual("Toetslaag 3", dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); Assert.AreEqual(DataGridViewAutoSizeColumnsMode.AllCells, dataGridView.AutoSizeColumnsMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, dataGridView.ColumnHeadersDefaultCellStyle.Alignment); @@ -243,31 +231,42 @@ { new Point2D(0, 0) }); + var section3 = new FailureMechanismSection("Section 3", new[] + { + new Point2D(0, 0) + }); + Random random = new Random(21); var result1 = new ClosingStructuresFailureMechanismSectionResult(section1) { - AssessmentLayerOne = true, + AssessmentLayerOne = AssessmentLayerOneState.Sufficient, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; var result2 = new ClosingStructuresFailureMechanismSectionResult(section2) { - AssessmentLayerOne = false, + AssessmentLayerOne = AssessmentLayerOneState.NotAssessed, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; + var result3 = new ClosingStructuresFailureMechanismSectionResult(section3) + { + AssessmentLayerOne = AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerThree = (RoundedDouble) random.NextDouble() + }; using (var view = ShowFailureMechanismResultsView()) { // When view.Data = new[] { result1, - result2 + result2, + result3 }; // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; DataGridViewRowCollection rows = dataGridView.Rows; - Assert.AreEqual(2, rows.Count); + Assert.AreEqual(3, rows.Count); DataGridViewCellCollection cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); @@ -277,8 +276,8 @@ Assert.AreEqual("-", cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual(result1.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); cells = rows[1].Cells; Assert.AreEqual(4, cells.Count); @@ -287,13 +286,26 @@ Assert.AreEqual("-", cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual(result2.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsEnabled(cells[assessmentLayerTwoAIndex], true); - AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex], true); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + + cells = rows[2].Cells; + Assert.AreEqual(4, cells.Count); + Assert.AreEqual("Section 3", cells[nameColumnIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); + Assert.AreEqual("-", cells[assessmentLayerTwoAIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); + + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex], true); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); } } [Test] - public void GivenFormWithClosingStructuresFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled() + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + public void GivenFormWithClosingStructuresFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled( + AssessmentLayerOneState assessmentLayerOneState) { // Given var section = new FailureMechanismSection("Section 1", new[] @@ -303,7 +315,7 @@ Random random = new Random(21); var result = new ClosingStructuresFailureMechanismSectionResult(section) { - AssessmentLayerOne = false, + AssessmentLayerOne = assessmentLayerOneState, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; using (var view = ShowFailureMechanismResultsView()) @@ -314,7 +326,7 @@ }; // When - result.AssessmentLayerOne = true; + result.AssessmentLayerOne = AssessmentLayerOneState.Sufficient; result.NotifyObservers(); // Then @@ -325,8 +337,8 @@ DataGridViewCellCollection cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); } } @@ -543,20 +555,6 @@ return section; } - private static void AssertCellIsDisabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(true, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), dataGridViewCell.Style.BackColor); - } - - private static void AssertCellIsEnabled(DataGridViewCell dataGridViewCell, bool readOnly = false) - { - Assert.AreEqual(readOnly, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), dataGridViewCell.Style.BackColor); - } - private ClosingStructuresFailureMechanismResultView CreateConfiguredFailureMechanismResultsView() { var failureMechanism = new ClosingStructuresFailureMechanism(); Index: Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/AssessmentLayerOneState.cs =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/AssessmentLayerOneState.cs (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/AssessmentLayerOneState.cs (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -0,0 +1,50 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using Core.Common.Utils.Attributes; +using Ringtoets.Common.Data.Properties; + +namespace Ringtoets.Common.Data.FailureMechanism +{ + /// + /// This enum defines the possible statuses for assessment layer one for each failure mechanism section + /// + public enum AssessmentLayerOneState + { + /// + /// The failure mechanism section was not assessed. + /// + [ResourcesDisplayName(typeof(Resources), "AssessmentLayerOneState_NotAssessed")] + NotAssessed = 1, + + /// + /// The assessment of the failure mechanism section was sufficient. + /// + [ResourcesDisplayName(typeof(Resources), "AssessmentLayerOneState_Sufficient")] + Sufficient = 2, + + /// + /// The assessment of the failure mechanism section requires a detailed assessment. + /// + [ResourcesDisplayName(typeof(Resources), "AssessmentLayerOneState_NeedsDetailedAssessment")] + NeedsDetailedAssessment = 3 + } +} \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/FailureMechanismSectionResult.cs =================================================================== diff -u -r41a37c93cb0b3e36ff7023c9f42b4e6225598b55 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/FailureMechanismSectionResult.cs (.../FailureMechanismSectionResult.cs) (revision 41a37c93cb0b3e36ff7023c9f42b4e6225598b55) +++ Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/FailureMechanismSectionResult.cs (.../FailureMechanismSectionResult.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -42,13 +42,14 @@ throw new ArgumentNullException("section"); } Section = section; + AssessmentLayerOne = AssessmentLayerOneState.NotAssessed; AssessmentLayerThree = RoundedDouble.NaN; } /// /// Gets or sets the state of the assessment layer one. /// - public bool AssessmentLayerOne { get; set; } + public AssessmentLayerOneState AssessmentLayerOne { get; set; } /// /// Gets or sets the value of the tailored assessment of safety. Index: Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs =================================================================== diff -u -r4dd554d18830c07f60c4d32467f9ac06127837be -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 4dd554d18830c07f60c4d32467f9ac06127837be) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -22,7 +22,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -92,6 +92,33 @@ } /// + /// Looks up a localized string similar to Detailtoets nodig. + /// + public static string AssessmentLayerOneState_NeedsDetailedAssessment { + get { + return ResourceManager.GetString("AssessmentLayerOneState_NeedsDetailedAssessment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Nog niet beoordeeld. + /// + public static string AssessmentLayerOneState_NotAssessed { + get { + return ResourceManager.GetString("AssessmentLayerOneState_NotAssessed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Voldoende. + /// + public static string AssessmentLayerOneState_Sufficient { + get { + return ResourceManager.GetString("AssessmentLayerOneState_Sufficient", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Onvoldoende. /// public static string AssessmentLayerTwoAResult_Failed { Index: Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx =================================================================== diff -u -r4dd554d18830c07f60c4d32467f9ac06127837be -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision 4dd554d18830c07f60c4d32467f9ac06127837be) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -237,4 +237,13 @@ De waarde voor de afwijking van de golfrichting moet in het bereik [-360, 360] liggen. + + Detailtoets nodig + + + Nog niet beoordeeld + + + Voldoende + \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj =================================================================== diff -u -r2d5e2d09b0cb1a7f48e1b0a067d332347c89d4a8 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 2d5e2d09b0cb1a7f48e1b0a067d332347c89d4a8) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -49,6 +49,7 @@ + Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Helpers/FailureMechanismSectionResultRowHelper.cs =================================================================== diff -u -rf419c811044695e9a3a7dd9729d9e25d3705a67a -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Common/src/Ringtoets.Common.Forms/Helpers/FailureMechanismSectionResultRowHelper.cs (.../FailureMechanismSectionResultRowHelper.cs) (revision f419c811044695e9a3a7dd9729d9e25d3705a67a) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Helpers/FailureMechanismSectionResultRowHelper.cs (.../FailureMechanismSectionResultRowHelper.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -22,6 +22,7 @@ using System; using System.Windows.Forms; using Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Forms.Properties; using Ringtoets.Common.Forms.Views; @@ -42,15 +43,15 @@ /// section result. May be null if the section result does not have a calculation set. /// Thrown when is null. public static void ShowAssessmentLayerTwoAErrors(DataGridViewCell dataGridViewCell, - bool passedAssessmentLayerOne, double assessmentLayerTwoA, + AssessmentLayerOneState passedAssessmentLayerOne, double assessmentLayerTwoA, ICalculation normativeCalculation) { if (dataGridViewCell == null) { throw new ArgumentNullException("dataGridViewCell"); } - if (passedAssessmentLayerOne) + if (passedAssessmentLayerOne == AssessmentLayerOneState.Sufficient) { dataGridViewCell.ErrorText = string.Empty; return; Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.cs =================================================================== diff -u -rcf2dc4330cecec3b8c8acae9e195280323fc2a50 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.cs (.../FailureMechanismResultView.cs) (revision cf2dc4330cecec3b8c8acae9e195280323fc2a50) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.cs (.../FailureMechanismResultView.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -19,13 +19,17 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; using Core.Common.Base; using Core.Common.Controls.DataGrid; using Core.Common.Controls.Views; +using Core.Common.Utils; +using Core.Common.Utils.Reflection; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Forms.Properties; using CoreCommonResources = Core.Common.Base.Properties.Resources; using CoreCommonControlsResources = Core.Common.Controls.Properties.Resources; @@ -98,6 +102,12 @@ protected DataGridViewControl DataGridViewControl { get; private set; } + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + AddDataGridColumns(); + } + /// /// Creates a display object for which is added to the /// on the . @@ -131,7 +141,8 @@ /// false if assessment level 1 has passed, true otherwise. protected bool HasPassedLevelOne(int rowIndex) { - return (bool) DataGridViewControl.GetCell(rowIndex, assessmentLayerOneColumnIndex).Value; + return (AssessmentLayerOneState) DataGridViewControl.GetCell(rowIndex, assessmentLayerOneColumnIndex).Value + == AssessmentLayerOneState.Sufficient; } /// @@ -159,6 +170,30 @@ return DataGridViewControl.GetRowFromIndex(rowIndex).DataBoundItem; } + /// + /// Adds the columns section name and the assessment layer one in the view. + /// + protected virtual void AddDataGridColumns() + { + DataGridViewControl.AddTextBoxColumn( + TypeUtils.GetMemberName>(sr => sr.Name), + Resources.FailureMechanismResultView_InitializeDataGridView_Section_name, + true); + + EnumDisplayWrapper[] oneStateDataSource = + Enum.GetValues(typeof(AssessmentLayerOneState)) + .OfType() + .Select(el => new EnumDisplayWrapper(el)) + .ToArray(); + + DataGridViewControl.AddComboBoxColumn( + TypeUtils.GetMemberName>(sr => sr.AssessmentLayerOne), + Resources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one, + oneStateDataSource, + TypeUtils.GetMemberName>(edw => edw.Value), + TypeUtils.GetMemberName>(edw => edw.DisplayName)); + } + private IEnumerable FailureMechanismSectionResult { set Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismSectionResultRow.cs =================================================================== diff -u -r673e35de0df920529e5dda63ea8b4dfb08ed65a8 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismSectionResultRow.cs (.../FailureMechanismSectionResultRow.cs) (revision 673e35de0df920529e5dda63ea8b4dfb08ed65a8) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismSectionResultRow.cs (.../FailureMechanismSectionResultRow.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -63,7 +63,7 @@ /// /// Gets or sets the value representing whether the section passed the layer 0 assessment. /// - public bool AssessmentLayerOne + public AssessmentLayerOneState AssessmentLayerOne { get { Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/FailureMechanism/FailureMechanismSectionResultTest.cs =================================================================== diff -u -r673e35de0df920529e5dda63ea8b4dfb08ed65a8 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/FailureMechanism/FailureMechanismSectionResultTest.cs (.../FailureMechanismSectionResultTest.cs) (revision 673e35de0df920529e5dda63ea8b4dfb08ed65a8) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/FailureMechanism/FailureMechanismSectionResultTest.cs (.../FailureMechanismSectionResultTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -42,7 +42,7 @@ // Assert Assert.IsInstanceOf(result); - Assert.IsFalse(result.AssessmentLayerOne); + Assert.AreEqual(AssessmentLayerOneState.NotAssessed, result.AssessmentLayerOne); Assert.IsNaN(result.AssessmentLayerThree); Assert.AreSame(section, result.Section); } @@ -59,9 +59,10 @@ } [Test] - [TestCase(true)] - [TestCase(false)] - public void AssessmentLayerOne_SetNewValue_ReturnsNewValue(bool newValue) + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.Sufficient)] + public void AssessmentLayerOne_SetNewValue_ReturnsNewValue(AssessmentLayerOneState newValue) { // Setup FailureMechanismSection section = CreateSection(); Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/TestFailureMechanismSectionResultTest.cs =================================================================== diff -u -rfd75ff7d1794c6a64fd3ce1aa1f159effba2e102 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/TestFailureMechanismSectionResultTest.cs (.../TestFailureMechanismSectionResultTest.cs) (revision fd75ff7d1794c6a64fd3ce1aa1f159effba2e102) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/TestFailureMechanismSectionResultTest.cs (.../TestFailureMechanismSectionResultTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -55,7 +55,7 @@ // Assert Assert.IsInstanceOf(result); - Assert.IsFalse(result.AssessmentLayerOne); + Assert.AreEqual(AssessmentLayerOneState.NotAssessed, result.AssessmentLayerOne); Assert.AreEqual(RoundedDouble.NaN, result.AssessmentLayerThree); Assert.AreSame(section, result.Section); } Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Helpers/FailureMechanismSectionResultRowHelperTest.cs =================================================================== diff -u -rb7f496624546731a31137ae48d73c92456b1fe1d -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Helpers/FailureMechanismSectionResultRowHelperTest.cs (.../FailureMechanismSectionResultRowHelperTest.cs) (revision b7f496624546731a31137ae48d73c92456b1fe1d) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Helpers/FailureMechanismSectionResultRowHelperTest.cs (.../FailureMechanismSectionResultRowHelperTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -26,6 +26,7 @@ using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Forms.Helpers; namespace Ringtoets.Common.Forms.Test.Helpers @@ -42,7 +43,9 @@ mockRepository.ReplayAll(); // Call - TestDelegate call = () => FailureMechanismSectionResultRowHelper.ShowAssessmentLayerTwoAErrors(null, true, 0.0, calculationStub); + TestDelegate call = () => FailureMechanismSectionResultRowHelper.ShowAssessmentLayerTwoAErrors(null, + AssessmentLayerOneState.Sufficient, + 0.0, calculationStub); // Assert string paramName = Assert.Throws(call).ParamName; @@ -53,7 +56,7 @@ [Test] [TestCaseSource("ValidShowAssessmentLayerTwoAErrorsArguments")] public void ShowAssessmentLayerTwoAErrors_SetsErrorText(DataGridViewCell dataGridViewCell, - bool passedAssessmentLayerOne, + AssessmentLayerOneState passedAssessmentLayerOne, double assessmentLayerTwoA, ICalculation normativeCalculation, string expectedErrorText) @@ -75,28 +78,30 @@ ErrorText = "Default text" }; - yield return new TestCaseData(dataGridViewCell, true, double.NaN, new CalculationWithoutOutput(), + yield return new TestCaseData(dataGridViewCell, AssessmentLayerOneState.Sufficient, double.NaN, + new CalculationWithoutOutput(), string.Empty); + yield return new TestCaseData(dataGridViewCell, AssessmentLayerOneState.Sufficient, 0.0, new CalculationWithoutOutput(), string.Empty); - yield return new TestCaseData(dataGridViewCell, true, 0.0, new CalculationWithoutOutput(), + yield return new TestCaseData(dataGridViewCell, AssessmentLayerOneState.Sufficient, double.NaN, null, string.Empty); + yield return new TestCaseData(dataGridViewCell, AssessmentLayerOneState.Sufficient, 0.0, null, string.Empty); + yield return new TestCaseData(dataGridViewCell, AssessmentLayerOneState.Sufficient, double.NaN, new CalculationWithOutput(), string.Empty); - yield return new TestCaseData(dataGridViewCell, true, double.NaN, null, string.Empty); - yield return new TestCaseData(dataGridViewCell, true, 0.0, null, string.Empty); - yield return new TestCaseData(dataGridViewCell, true, double.NaN, new CalculationWithOutput(), + yield return new TestCaseData(dataGridViewCell, AssessmentLayerOneState.Sufficient, 0.0, new CalculationWithOutput(), string.Empty); - yield return new TestCaseData(dataGridViewCell, true, 0.0, new CalculationWithOutput(), - string.Empty); - yield return new TestCaseData(dataGridViewCell, false, double.NaN, null, "Er moet een maatgevende berekening voor dit vak worden geselecteerd."); - yield return new TestCaseData(dataGridViewCell, false, 0.0, null, "Er moet een maatgevende berekening voor dit vak worden geselecteerd."); + yield return new TestCaseData(dataGridViewCell, AssessmentLayerOneState.NotAssessed, double.NaN, null, + "Er moet een maatgevende berekening voor dit vak worden geselecteerd."); + yield return new TestCaseData(dataGridViewCell, AssessmentLayerOneState.NotAssessed, 0.0, null, + "Er moet een maatgevende berekening voor dit vak worden geselecteerd."); - yield return new TestCaseData(dataGridViewCell, false, double.NaN, new CalculationWithoutOutput(), + yield return new TestCaseData(dataGridViewCell, AssessmentLayerOneState.NotAssessed, double.NaN, + new CalculationWithoutOutput(), "De maatgevende berekening voor dit vak moet nog worden uitgevoerd."); + yield return new TestCaseData(dataGridViewCell, AssessmentLayerOneState.NotAssessed, 0.0, new CalculationWithoutOutput(), "De maatgevende berekening voor dit vak moet nog worden uitgevoerd."); - yield return new TestCaseData(dataGridViewCell, false, 0.0, new CalculationWithoutOutput(), - "De maatgevende berekening voor dit vak moet nog worden uitgevoerd."); - yield return new TestCaseData(dataGridViewCell, false, double.NaN, new CalculationWithOutput(), + yield return new TestCaseData(dataGridViewCell, AssessmentLayerOneState.NotAssessed, double.NaN, new CalculationWithOutput(), "De maatgevende berekening voor dit vak moet een geldige uitkomst hebben."); - yield return new TestCaseData(dataGridViewCell, false, 0.0, new CalculationWithOutput(), + yield return new TestCaseData(dataGridViewCell, AssessmentLayerOneState.NotAssessed, 0.0, new CalculationWithOutput(), string.Empty); } Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/FailureMechanismResultViewTest.cs =================================================================== diff -u -r2857b234df4622cdaf80bbc75abc58af36667347 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/FailureMechanismResultViewTest.cs (.../FailureMechanismResultViewTest.cs) (revision 2857b234df4622cdaf80bbc75abc58af36667347) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/FailureMechanismResultViewTest.cs (.../FailureMechanismResultViewTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -64,13 +64,22 @@ [Test] public void Constructor_DataGridViewCorrectlyInitialized() { + // Setup + const int nameColumnIndex = 0; + const int assessmentLayerOneIndex = 1; + // Call using (ShowFailureMechanismResultsView()) { // Assert var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; - Assert.AreEqual(0, dataGridView.ColumnCount); + Assert.AreEqual(2, dataGridView.ColumnCount); + Assert.IsInstanceOf(dataGridView.Columns[nameColumnIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); + + Assert.AreEqual("Vak", dataGridView.Columns[nameColumnIndex].HeaderText); + Assert.AreEqual("Toetslaag 1", dataGridView.Columns[assessmentLayerOneIndex].HeaderText); } } Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/FailureMechanismSectionResultRowTest.cs =================================================================== diff -u -re42bdf3dd379c46bab9212eb7b30f4754c9bc91c -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/FailureMechanismSectionResultRowTest.cs (.../FailureMechanismSectionResultRowTest.cs) (revision e42bdf3dd379c46bab9212eb7b30f4754c9bc91c) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/FailureMechanismSectionResultRowTest.cs (.../FailureMechanismSectionResultRowTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -67,9 +67,10 @@ } [Test] - [TestCase(true)] - [TestCase(false)] - public void AssessmentLayerOne_AlwaysOnChange_NotifyObserversOfResultAndResultPropertyChanged(bool newValue) + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.Sufficient)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + public void AssessmentLayerOne_AlwaysOnChange_NotifyObserversOfResultAndResultPropertyChanged(AssessmentLayerOneState newValue) { // Setup var mocks = new MockRepository(); Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/DataGridViewCellTesterTest.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/DataGridViewCellTesterTest.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/DataGridViewCellTesterTest.cs (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -0,0 +1,202 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Collections.Generic; +using System.Drawing; +using System.Windows.Forms; +using NUnit.Framework; + +namespace Ringtoets.Common.Forms.TestUtil.Test +{ + [TestFixture] + public class DataGridViewCellTesterTest + { + [Test] + public void AssertCellIsDisabled_DisabledCell_DoesNotThrowAssertionException() + { + // Setup + DataGridViewRow row = new DataGridViewRow() + { + ReadOnly = true, + Cells = + { + new DataCell(new DataGridViewCellStyle() + { + ForeColor = Color.FromKnownColor(KnownColor.GrayText), + BackColor = Color.FromKnownColor(KnownColor.DarkGray) + }) + } + }; + + // Call + TestDelegate call = () => DataGridViewCellTester.AssertCellIsDisabled(row.Cells[0]); + + // Assert + Assert.DoesNotThrow(call); + } + + [Test] + [TestCase(true)] + [TestCase(false)] + public void AssertCellIsEnabled_EnabledCell_DoesNotThrowAssertionException(bool readOnlyProperty) + { + // Setup + DataGridViewRow row = new DataGridViewRow() + { + ReadOnly = readOnlyProperty, + Cells = + { + new DataCell(new DataGridViewCellStyle() + { + ForeColor = Color.FromKnownColor(KnownColor.ControlText), + BackColor = Color.FromKnownColor(KnownColor.White) + }) + } + }; + + // Call + TestDelegate call = () => DataGridViewCellTester.AssertCellIsEnabled(row.Cells[0], readOnlyProperty); + + // Assert + Assert.DoesNotThrow(call); + } + + [Test] + [TestCaseSource("InvalidDisabledCells")] + public void AssertCellIsDisabled_InvalidDisabledCells_ThrowAssertionException(DataGridViewRow row) + { + // Call + TestDelegate call = () => DataGridViewCellTester.AssertCellIsDisabled(row.Cells[0]); + + // Assert + Assert.Throws(call); + } + + [Test] + [TestCaseSource("InvalidEnabledCells")] + public void AssertCellIsEnabled_InvalidDisabledCells_ThrowAssertionException(DataGridViewRow row) + { + // Call + TestDelegate call = () => DataGridViewCellTester.AssertCellIsEnabled(row.Cells[0]); + + // Assert + Assert.Throws(call); + } + + private class DataCell : DataGridViewCell + { + public DataCell(DataGridViewCellStyle style) + { + Style = style; + } + } + + #region Test data + + private static IEnumerable InvalidDisabledCells + { + get + { + yield return new TestCaseData(new DataGridViewRow() + { + ReadOnly = false, + Cells = + { + new DataCell(new DataGridViewCellStyle() + { + ForeColor = Color.FromKnownColor(KnownColor.GrayText), + BackColor = Color.FromKnownColor(KnownColor.DarkGray) + }) + } + }).SetName("ReadOnlyPropertyFalse"); + yield return new TestCaseData(new DataGridViewRow() + { + ReadOnly = true, + Cells = + { + new DataCell(new DataGridViewCellStyle() + { + ForeColor = Color.FromKnownColor(KnownColor.ControlText), + BackColor = Color.FromKnownColor(KnownColor.DarkGray) + }) + } + }).SetName("ForeColorPropertyEnabledColor"); + yield return new TestCaseData(new DataGridViewRow() + { + ReadOnly = true, + Cells = + { + new DataCell(new DataGridViewCellStyle() + { + ForeColor = Color.FromKnownColor(KnownColor.GrayText), + BackColor = Color.FromKnownColor(KnownColor.White) + }) + } + }).SetName("BackColorPropertyEnabledColor"); + } + } + + private static IEnumerable InvalidEnabledCells + { + get + { + yield return new TestCaseData(new DataGridViewRow() + { + ReadOnly = true, + Cells = + { + new DataCell(new DataGridViewCellStyle() + { + ForeColor = Color.FromKnownColor(KnownColor.ControlText), + BackColor = Color.FromKnownColor(KnownColor.White) + }) + } + }).SetName("ReadOnlyPropertyTrue"); + yield return new TestCaseData(new DataGridViewRow() + { + ReadOnly = false, + Cells = + { + new DataCell(new DataGridViewCellStyle() + { + ForeColor = Color.FromKnownColor(KnownColor.GrayText), + BackColor = Color.FromKnownColor(KnownColor.White) + }) + } + }).SetName("ForeColorPropertyDisabledColor"); + yield return new TestCaseData(new DataGridViewRow() + { + ReadOnly = false, + Cells = + { + new DataCell(new DataGridViewCellStyle() + { + ForeColor = Color.FromKnownColor(KnownColor.ControlText), + BackColor = Color.FromKnownColor(KnownColor.DarkGray) + }) + } + }).SetName("BackColorPropertyDisabledColor"); + } + } + + #endregion + } +} \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/Properties/AssemblyInfo.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/Properties/AssemblyInfo.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/Properties/AssemblyInfo.cs (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -0,0 +1,27 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Ringtoets.Common.Forms.TestUtil.Test")] +[assembly: AssemblyProduct("Ringtoets.Common.Forms.TestUtil.Test")] +[assembly: Guid("76693d86-7225-436c-a32a-48448757a3aa")] \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/Ringtoets.Common.Forms.TestUtil.Test.csproj =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/Ringtoets.Common.Forms.TestUtil.Test.csproj (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/Ringtoets.Common.Forms.TestUtil.Test.csproj (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -0,0 +1,77 @@ + + + + Debug + x86 + {659D7F4A-18FD-4999-9886-C8BA5017955D} + Library + Properties + Ringtoets.Common.Forms.TestUtil.Test + Ringtoets.Common.Forms.TestUtil.Test + v4.0 + 512 + + + true + bin\Debug\ + 4 + x86 + MinimumRecommendedRules.ruleset + TRACE;DEBUG + full + + + bin\Release\ + 4 + x86 + MinimumRecommendedRules.ruleset + TRACE + true + none + + + bin\ReleaseForCodeCoverage\ + TRACE + true + x86 + MinimumRecommendedRules.ruleset + none + + + + ..\..\..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll + True + + + + + + + + + Properties\GlobalAssembly.cs + + + + + + + Copying.licenseheader + + + + + + {D24FA2F7-28A7-413B-AFD3-EE10E985630B} + Ringtoets.Common.Forms.TestUtil + + + + + \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/packages.config =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/packages.config (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil.Test/packages.config (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/DataGridViewCellTester.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/DataGridViewCellTester.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/DataGridViewCellTester.cs (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -0,0 +1,68 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Drawing; +using System.Windows.Forms; +using NUnit.Framework; + +namespace Ringtoets.Common.Forms.TestUtil +{ + /// + /// Class that can be used to test properties of a . + /// + public static class DataGridViewCellTester + { + /// + /// Asserts whether a is in a disabled state. + /// + /// The cell that needs to be asserted. + /// Thrown when: + /// + /// The readonly property of the cell is false. + /// The is not . + /// The is not . + /// + public static void AssertCellIsDisabled(DataGridViewCell dataGridViewCell) + { + Assert.AreEqual(true, dataGridViewCell.ReadOnly); + Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), dataGridViewCell.Style.ForeColor); + Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), dataGridViewCell.Style.BackColor); + } + + /// + /// Asserts whether a is in an enabled state. + /// + /// The cell that needs to be asserted. + /// Flag indicating whether the cell is readonly + /// Thrown when: + /// + /// The readonly property of the cell does not match with . + /// The is not . + /// The is not . + /// + public static void AssertCellIsEnabled(DataGridViewCell dataGridViewCell, bool isReadOnly = false) + { + Assert.AreEqual(isReadOnly, dataGridViewCell.ReadOnly); + Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), dataGridViewCell.Style.ForeColor); + Assert.AreEqual(Color.FromKnownColor(KnownColor.White), dataGridViewCell.Style.BackColor); + } + } +} \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/Properties/AssemblyInfo.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/Properties/AssemblyInfo.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/Properties/AssemblyInfo.cs (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -0,0 +1,27 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Ringtoets.Common.Forms.TestUtil")] +[assembly: AssemblyProduct("Ringtoets.Common.Forms.TestUtil")] +[assembly: Guid("4ff1a47f-e1eb-4384-90a1-aa0ef8959482")] \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/Ringtoets.Common.Forms.TestUtil.csproj =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/Ringtoets.Common.Forms.TestUtil.csproj (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/Ringtoets.Common.Forms.TestUtil.csproj (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -0,0 +1,71 @@ + + + + Debug + x86 + {D24FA2F7-28A7-413B-AFD3-EE10E985630B} + Library + Properties + Ringtoets.Common.Forms.TestUtil + Ringtoets.Common.Forms.TestUtil + v4.0 + 512 + + + true + bin\Debug\ + 4 + x86 + MinimumRecommendedRules.ruleset + TRACE;DEBUG + full + + + bin\Release\ + 4 + x86 + MinimumRecommendedRules.ruleset + TRACE + true + none + + + bin\ReleaseForCodeCoverage\ + TRACE + true + x86 + MinimumRecommendedRules.ruleset + pdbonly + + + + ..\..\..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll + True + + + + + + + + + Properties\GlobalAssembly.cs + + + + + + + Copying.licenseheader + + + + + + \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/packages.config =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/packages.config (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/packages.config (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -0,0 +1,27 @@ + + + + + + \ No newline at end of file Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsFailureMechanismResultView.cs =================================================================== diff -u -r4c6816a0272d6b38fb78d2d562b85248aa755e5d -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsFailureMechanismResultView.cs (.../GrassCoverErosionInwardsFailureMechanismResultView.cs) (revision 4c6816a0272d6b38fb78d2d562b85248aa755e5d) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsFailureMechanismResultView.cs (.../GrassCoverErosionInwardsFailureMechanismResultView.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -65,8 +65,6 @@ calculationGroupObserver = new RecursiveObserver( UpdateDataGridViewDataSource, c => c.Children); - - AddDataGridColumns(); } public override IFailureMechanism FailureMechanism @@ -101,16 +99,11 @@ return new GrassCoverErosionInwardsFailureMechanismSectionResultRow(sectionResult); } - private void AddDataGridColumns() + protected override void AddDataGridColumns() { + base.AddDataGridColumns(); + DataGridViewControl.AddTextBoxColumn( - TypeUtils.GetMemberName(sr => sr.Name), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name, - true); - DataGridViewControl.AddCheckBoxColumn( - TypeUtils.GetMemberName(sr => sr.AssessmentLayerOne), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one); - DataGridViewControl.AddTextBoxColumn( TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, true); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj =================================================================== diff -u -r2aeb951ddc6e2137897569a2de4c55c9fb7e2420 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj) (revision 2aeb951ddc6e2137897569a2de4c55c9fb7e2420) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -167,6 +167,10 @@ {4843D6E5-066F-4795-94F5-1D53932DD03C} Ringtoets.Common.Data.TestUtil + + {d24fa2f7-28a7-413b-afd3-ee10e985630b} + Ringtoets.Common.Forms.TestUtil + {888d4097-8bc2-4703-9fb1-8744c94d525e} Ringtoets.HydraRing.Calculation Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismResultViewTest.cs =================================================================== diff -u -rb7f496624546731a31137ae48d73c92456b1fe1d -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismResultViewTest.cs (.../GrassCoverErosionInwardsFailureMechanismResultViewTest.cs) (revision b7f496624546731a31137ae48d73c92456b1fe1d) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismResultViewTest.cs (.../GrassCoverErosionInwardsFailureMechanismResultViewTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -19,9 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using System.Windows.Forms; using Core.Common.Base.Data; @@ -31,6 +29,7 @@ using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Probability; using Ringtoets.Common.Forms.Helpers; +using Ringtoets.Common.Forms.TestUtil; using Ringtoets.Common.Forms.Views; using Ringtoets.GrassCoverErosionInwards.Data; using Ringtoets.GrassCoverErosionInwards.Forms.Views; @@ -71,7 +70,7 @@ } [Test] - public void Constructor_DataGridViewCorrectlyInitialized() + public void GivenFormWithGrassCoverErosionInwardsFailureMechanismResultView_ThenExpectedColumnsAreVisible() { // Call using (ShowFailureMechanismResultsView()) @@ -82,12 +81,14 @@ Assert.AreEqual(4, dataGridView.ColumnCount); Assert.IsTrue(dataGridView.Columns[assessmentLayerTwoAIndex].ReadOnly); - foreach (var column in dataGridView.Columns.OfType()) - { - Assert.AreEqual("This", column.ValueMember); - Assert.AreEqual("DisplayName", column.DisplayMember); - } + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerTwoAIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerThreeIndex]); + Assert.AreEqual("Toetslaag 1", dataGridView.Columns[assessmentLayerOneIndex].HeaderText); + Assert.AreEqual("Toetslaag 2a", dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); + Assert.AreEqual("Toetslaag 3", dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); + Assert.AreEqual(DataGridViewAutoSizeColumnsMode.AllCells, dataGridView.AutoSizeColumnsMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, dataGridView.ColumnHeadersDefaultCellStyle.Alignment); } @@ -156,32 +157,34 @@ var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); Assert.AreEqual("Section 1", cells[nameColumnIndex].FormattedValue); - Assert.IsFalse((bool) cells[assessmentLayerOneIndex].FormattedValue); + Assert.AreEqual(AssessmentLayerOneState.NotAssessed, cells[assessmentLayerOneIndex].Value); Assert.AreEqual("-", cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual("-", cells[assessmentLayerThreeIndex].FormattedValue); cells = rows[1].Cells; Assert.AreEqual(4, cells.Count); Assert.AreEqual("Section 2", cells[nameColumnIndex].FormattedValue); - Assert.IsFalse((bool) cells[assessmentLayerOneIndex].FormattedValue); + Assert.AreEqual(AssessmentLayerOneState.NotAssessed, cells[assessmentLayerOneIndex].Value); Assert.AreEqual("-", cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual("-", cells[assessmentLayerThreeIndex].FormattedValue); } } [Test] [SetCulture("nl-NL")] - [TestCase(true)] - [TestCase(false)] - public void FailureMechanismResultsView_ChangeCheckBox_DataGridViewCorrectlySyncedAndStylingSet(bool checkBoxSelected) + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + [TestCase(AssessmentLayerOneState.Sufficient)] + public void FailureMechanismResultsView_ChangeCheckBox_DataGridViewCorrectlySyncedAndStylingSet( + AssessmentLayerOneState assessmentLayerOneState) { // Setup using (ShowFullyConfiguredFailureMechanismResultsView()) { var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; // Call - dataGridView.Rows[0].Cells[assessmentLayerOneIndex].Value = checkBoxSelected; + dataGridView.Rows[0].Cells[assessmentLayerOneIndex].Value = assessmentLayerOneState; // Assert var rows = dataGridView.Rows; @@ -193,32 +196,25 @@ var cellAssessmentLayerThree = cells[assessmentLayerThreeIndex]; DataGridViewCell dataGridViewCell = cells[assessmentLayerOneIndex]; - Assert.AreEqual(checkBoxSelected, (bool)dataGridViewCell.FormattedValue); + Assert.AreEqual(assessmentLayerOneState, dataGridViewCell.Value); Assert.AreEqual("-", cellAssessmentLayerTwoA.FormattedValue); Assert.AreEqual("-", cellAssessmentLayerThree.FormattedValue); Assert.IsEmpty(dataGridViewCell.ErrorText); - var cellAssessmentLayerTwoABackColor = cellAssessmentLayerTwoA.Style.BackColor; - var cellAssessmentLayerTwoAForeColor = cellAssessmentLayerTwoA.Style.ForeColor; - var cellAssessmentLayerThreeBackColor = cellAssessmentLayerThree.Style.BackColor; - var cellAssessmentLayerThreeForeColor = cellAssessmentLayerThree.Style.ForeColor; - - if (checkBoxSelected) + if (assessmentLayerOneState == AssessmentLayerOneState.Sufficient) { - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), cellAssessmentLayerTwoABackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), cellAssessmentLayerTwoAForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), cellAssessmentLayerThreeBackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), cellAssessmentLayerThreeForeColor); + DataGridViewCellTester.AssertCellIsDisabled(cellAssessmentLayerTwoA); + DataGridViewCellTester.AssertCellIsDisabled(cellAssessmentLayerThree); + + Assert.IsTrue(cellAssessmentLayerThree.ReadOnly); } else { - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), cellAssessmentLayerTwoABackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), cellAssessmentLayerTwoAForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), cellAssessmentLayerThreeBackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), cellAssessmentLayerThreeForeColor); - } + DataGridViewCellTester.AssertCellIsEnabled(cellAssessmentLayerTwoA, true); + DataGridViewCellTester.AssertCellIsEnabled(cellAssessmentLayerThree); - Assert.AreEqual(checkBoxSelected, cellAssessmentLayerThree.ReadOnly); + Assert.IsFalse(cellAssessmentLayerThree.ReadOnly); + } } } @@ -269,32 +265,6 @@ } [Test] - public void FailureMechanismResultView_EditValueDirtyStateChangedEventFired_ValueCommittedCellInEditMode() - { - // Setup - using (var view = ShowFullyConfiguredFailureMechanismResultsView()) - { - var sections = (List) view.Data; - sections[0].AssessmentLayerOne = false; - - var gridTester = new ControlTester("dataGridView"); - var dataGridView = (DataGridView) gridTester.TheObject; - var dataGridViewCell = dataGridView.Rows[0].Cells[assessmentLayerOneIndex]; - - dataGridView.CurrentCell = dataGridViewCell; - dataGridView.BeginEdit(false); - gridTester.FireEvent("KeyUp", new KeyEventArgs(Keys.Space)); - - // Call - gridTester.FireEvent("CurrentCellDirtyStateChanged", EventArgs.Empty); - - // Assert - Assert.IsTrue(dataGridViewCell.IsInEditMode); - Assert.IsTrue(sections[0].AssessmentLayerOne); - } - } - - [Test] public void GivenSectionResultWithoutCalculation_ThenLayerTwoAErrorTooltip() { // Given Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsFailureMechanismResultView.cs =================================================================== diff -u -r9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsFailureMechanismResultView.cs (.../GrassCoverErosionOutwardsFailureMechanismResultView.cs) (revision 9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsFailureMechanismResultView.cs (.../GrassCoverErosionOutwardsFailureMechanismResultView.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -44,8 +44,6 @@ public GrassCoverErosionOutwardsFailureMechanismResultView() { DataGridViewControl.AddCellFormattingHandler(OnCellFormatting); - - AddDataGridColumns(); } protected override object CreateFailureMechanismSectionResultRow(GrassCoverErosionOutwardsFailureMechanismSectionResult sectionResult) @@ -60,36 +58,16 @@ base.Dispose(disposing); } - private void OnCellFormatting(object sender, DataGridViewCellFormattingEventArgs eventArgs) + protected override void AddDataGridColumns() { - if (eventArgs.ColumnIndex > assessmentLayerOneColumnIndex) - { - if (HasPassedLevelOne(eventArgs.RowIndex)) - { - DataGridViewControl.DisableCell(eventArgs.RowIndex, eventArgs.ColumnIndex); - } - else - { - DataGridViewControl.RestoreCell(eventArgs.RowIndex, eventArgs.ColumnIndex); - } - } - } + base.AddDataGridColumns(); - private void AddDataGridColumns() - { EnumDisplayWrapper[] twoAResultDataSource = Enum.GetValues(typeof(AssessmentLayerTwoAResult)) .OfType() .Select(el => new EnumDisplayWrapper(el)) .ToArray(); - DataGridViewControl.AddTextBoxColumn( - TypeUtils.GetMemberName(sr => sr.Name), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name, - true); - DataGridViewControl.AddCheckBoxColumn( - TypeUtils.GetMemberName(sr => sr.AssessmentLayerOne), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one); DataGridViewControl.AddComboBoxColumn( TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, @@ -100,5 +78,20 @@ TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three); } + + private void OnCellFormatting(object sender, DataGridViewCellFormattingEventArgs eventArgs) + { + if (eventArgs.ColumnIndex > assessmentLayerOneColumnIndex) + { + if (HasPassedLevelOne(eventArgs.RowIndex)) + { + DataGridViewControl.DisableCell(eventArgs.RowIndex, eventArgs.ColumnIndex); + } + else + { + DataGridViewControl.RestoreCell(eventArgs.RowIndex, eventArgs.ColumnIndex); + } + } + } } } \ No newline at end of file Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj =================================================================== diff -u -rf718135c08ce7b90cc0eaf40bfb83c9af48a1776 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj) (revision f718135c08ce7b90cc0eaf40bfb83c9af48a1776) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -172,6 +172,10 @@ {4843D6E5-066F-4795-94F5-1D53932DD03C} Ringtoets.Common.Data.TestUtil + + {d24fa2f7-28a7-413b-afd3-ee10e985630b} + Ringtoets.Common.Forms.TestUtil + {888d4097-8bc2-4703-9fb1-8744c94d525e} Ringtoets.HydraRing.Calculation Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsFailureMechanismResultViewTest.cs =================================================================== diff -u -r2973c5f790a5131e427bd5f73e2a620044199639 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsFailureMechanismResultViewTest.cs (.../GrassCoverErosionOutwardsFailureMechanismResultViewTest.cs) (revision 2973c5f790a5131e427bd5f73e2a620044199639) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Views/GrassCoverErosionOutwardsFailureMechanismResultViewTest.cs (.../GrassCoverErosionOutwardsFailureMechanismResultViewTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -20,17 +20,16 @@ // All rights reserved. using System; -using System.Drawing; using System.Windows.Forms; using Core.Common.Base.Data; using Core.Common.Base.Geometry; using NUnit.Extensions.Forms; using NUnit.Framework; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.TestUtil; using Ringtoets.GrassCoverErosionOutwards.Data; using Ringtoets.GrassCoverErosionOutwards.Forms.Views; -using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.GrassCoverErosionOutwards.Forms.Test.Views { @@ -60,13 +59,13 @@ Assert.AreEqual(4, dataGridView.ColumnCount); - Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerTwoAIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerThreeIndex]); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one, dataGridView.Columns[assessmentLayerOneIndex].HeaderText); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three, dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); + Assert.AreEqual("Toetslaag 1", dataGridView.Columns[assessmentLayerOneIndex].HeaderText); + Assert.AreEqual("Toetslaag 2a", dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); + Assert.AreEqual("Toetslaag 3", dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); Assert.AreEqual(DataGridViewAutoSizeColumnsMode.AllCells, dataGridView.AutoSizeColumnsMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, dataGridView.ColumnHeadersDefaultCellStyle.Alignment); @@ -86,19 +85,30 @@ { new Point2D(0, 0) }); + var section3 = new FailureMechanismSection("Section 3", new[] + { + new Point2D(0, 0) + }); + Random random = new Random(21); var result1 = new GrassCoverErosionOutwardsFailureMechanismSectionResult(section1) { - AssessmentLayerOne = true, + AssessmentLayerOne = AssessmentLayerOneState.Sufficient, AssessmentLayerTwoA = AssessmentLayerTwoAResult.Failed, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; var result2 = new GrassCoverErosionOutwardsFailureMechanismSectionResult(section2) { - AssessmentLayerOne = false, + AssessmentLayerOne = AssessmentLayerOneState.NotAssessed, AssessmentLayerTwoA = AssessmentLayerTwoAResult.Successful, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; + var result3 = new GrassCoverErosionOutwardsFailureMechanismSectionResult(section3) + { + AssessmentLayerOne = AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerTwoA = AssessmentLayerTwoAResult.Successful, + AssessmentLayerThree = (RoundedDouble) random.NextDouble() + }; using (var form = new Form()) { @@ -111,14 +121,15 @@ view.Data = new[] { result1, - result2 + result2, + result3 }; // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; var rows = dataGridView.Rows; - Assert.AreEqual(2, rows.Count); + Assert.AreEqual(3, rows.Count); var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); @@ -127,8 +138,8 @@ Assert.AreEqual(result1.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); Assert.AreEqual(result1.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); cells = rows[1].Cells; Assert.AreEqual(4, cells.Count); @@ -137,14 +148,27 @@ Assert.AreEqual(result2.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); Assert.AreEqual(result2.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + + cells = rows[2].Cells; + Assert.AreEqual(4, cells.Count); + Assert.AreEqual("Section 3", cells[nameColumnIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); + Assert.AreEqual(result3.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); + Assert.AreEqual(result3.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); + + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); } } } [Test] - public void GivenFormWithGrassCoverErosionOutwardsFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled() + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + public void GivenFormWithGrassCoverErosionOutwardsFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled( + AssessmentLayerOneState assessmentLayerOneState) { // Given var section = new FailureMechanismSection("Section 1", new[] @@ -154,7 +178,7 @@ Random random = new Random(21); var result = new GrassCoverErosionOutwardsFailureMechanismSectionResult(section) { - AssessmentLayerOne = false, + AssessmentLayerOne = assessmentLayerOneState, AssessmentLayerTwoA = AssessmentLayerTwoAResult.Failed, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; @@ -171,7 +195,7 @@ }; // When - result.AssessmentLayerOne = true; + result.AssessmentLayerOne = AssessmentLayerOneState.Sufficient; result.NotifyObservers(); // Then @@ -182,8 +206,8 @@ var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); } } } @@ -224,19 +248,5 @@ } } } - - private static void AssertCellIsDisabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(true, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), dataGridViewCell.Style.BackColor); - } - - private static void AssertCellIsEnabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(false, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), dataGridViewCell.Style.BackColor); - } } } \ No newline at end of file Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresFailureMechanismResultView.cs =================================================================== diff -u -r4c6816a0272d6b38fb78d2d562b85248aa755e5d -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresFailureMechanismResultView.cs (.../HeightStructuresFailureMechanismResultView.cs) (revision 4c6816a0272d6b38fb78d2d562b85248aa755e5d) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresFailureMechanismResultView.cs (.../HeightStructuresFailureMechanismResultView.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -66,8 +66,6 @@ calculationGroupObserver = new RecursiveObserver( UpdateDataGridViewDataSource, c => c.Children); - - AddDataGridColumns(); } public override IFailureMechanism FailureMechanism @@ -104,16 +102,11 @@ return new HeightStructuresFailureMechanismSectionResultRow(sectionResult); } - private void AddDataGridColumns() + protected override void AddDataGridColumns() { + base.AddDataGridColumns(); + DataGridViewControl.AddTextBoxColumn( - TypeUtils.GetMemberName(sr => sr.Name), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name, - true); - DataGridViewControl.AddCheckBoxColumn( - TypeUtils.GetMemberName(sr => sr.AssessmentLayerOne), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one); - DataGridViewControl.AddTextBoxColumn( TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, true); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj =================================================================== diff -u -rf724e2a23cc180381b736c4da1318d87398e5758 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj (.../Ringtoets.HeightStructures.Forms.Test.csproj) (revision f724e2a23cc180381b736c4da1318d87398e5758) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj (.../Ringtoets.HeightStructures.Forms.Test.csproj) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -150,6 +150,10 @@ {4843D6E5-066F-4795-94F5-1D53932DD03C} Ringtoets.Common.Data.TestUtil + + {d24fa2f7-28a7-413b-afd3-ee10e985630b} + Ringtoets.Common.Forms.TestUtil + {70F8CC9C-5BC8-4FB2-B201-EAE7FA8088C2} Ringtoets.HydraRing.Data Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismResultViewTest.cs =================================================================== diff -u -rb7f496624546731a31137ae48d73c92456b1fe1d -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismResultViewTest.cs (.../HeightStructuresFailureMechanismResultViewTest.cs) (revision b7f496624546731a31137ae48d73c92456b1fe1d) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismResultViewTest.cs (.../HeightStructuresFailureMechanismResultViewTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -19,9 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using System.Windows.Forms; using Core.Common.Base.Data; @@ -32,6 +30,7 @@ using Ringtoets.Common.Data.Probability; using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms.Helpers; +using Ringtoets.Common.Forms.TestUtil; using Ringtoets.Common.Forms.Views; using Ringtoets.HeightStructures.Data; using Ringtoets.HeightStructures.Forms.Views; @@ -72,7 +71,7 @@ } [Test] - public void Constructor_DataGridViewCorrectlyInitialized() + public void GivenFormWithHeightStructuresFailureMechanismResultView_ThenExpectedColumnsAreVisible() { // Call using (ShowFailureMechanismResultsView()) @@ -83,12 +82,14 @@ Assert.AreEqual(4, dataGridView.ColumnCount); Assert.IsTrue(dataGridView.Columns[assessmentLayerTwoAIndex].ReadOnly); - foreach (var column in dataGridView.Columns.OfType()) - { - Assert.AreEqual("This", column.ValueMember); - Assert.AreEqual("DisplayName", column.DisplayMember); - } + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerTwoAIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerThreeIndex]); + Assert.AreEqual("Toetslaag 1", dataGridView.Columns[assessmentLayerOneIndex].HeaderText); + Assert.AreEqual("Toetslaag 2a", dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); + Assert.AreEqual("Toetslaag 3", dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); + Assert.AreEqual(DataGridViewAutoSizeColumnsMode.AllCells, dataGridView.AutoSizeColumnsMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, dataGridView.ColumnHeadersDefaultCellStyle.Alignment); } @@ -162,31 +163,33 @@ var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); Assert.AreEqual("Section 1", cells[nameColumnIndex].FormattedValue); - Assert.IsFalse((bool) cells[assessmentLayerOneIndex].FormattedValue); + Assert.AreEqual(AssessmentLayerOneState.NotAssessed, cells[assessmentLayerOneIndex].Value); Assert.AreEqual("-", cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual("-", cells[assessmentLayerThreeIndex].FormattedValue); cells = rows[1].Cells; Assert.AreEqual(4, cells.Count); Assert.AreEqual("Section 2", cells[nameColumnIndex].FormattedValue); - Assert.IsFalse((bool) cells[assessmentLayerOneIndex].FormattedValue); + Assert.AreEqual(AssessmentLayerOneState.NotAssessed, cells[assessmentLayerOneIndex].Value); Assert.AreEqual("-", cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual("-", cells[assessmentLayerThreeIndex].FormattedValue); } } [Test] - [TestCase(true)] - [TestCase(false)] - public void FailureMechanismResultsView_ChangeCheckBox_DataGridViewCorrectlySyncedAndStylingSet(bool checkBoxSelected) + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + [TestCase(AssessmentLayerOneState.Sufficient)] + public void FailureMechanismResultsView_ChangeAssessmentLayerOneState_DataGridViewCorrectlySyncedAndStylingSet( + AssessmentLayerOneState assessmentLayerOneState) { // Setup using (ShowFullyConfiguredFailureMechanismResultsView()) { var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; // Call - dataGridView.Rows[0].Cells[assessmentLayerOneIndex].Value = checkBoxSelected; + dataGridView.Rows[0].Cells[assessmentLayerOneIndex].Value = assessmentLayerOneState; // Assert var rows = dataGridView.Rows; @@ -198,32 +201,25 @@ var cellAssessmentLayerThree = cells[assessmentLayerThreeIndex]; DataGridViewCell dataGridViewCell = cells[assessmentLayerOneIndex]; - Assert.AreEqual(checkBoxSelected, (bool) dataGridViewCell.FormattedValue); + Assert.AreEqual(assessmentLayerOneState, cells[assessmentLayerOneIndex].Value); Assert.AreEqual("-", cellAssessmentLayerTwoA.FormattedValue); Assert.AreEqual("-", cellAssessmentLayerThree.FormattedValue); Assert.IsEmpty(dataGridViewCell.ErrorText); - var cellAssessmentLayerTwoABackColor = cellAssessmentLayerTwoA.Style.BackColor; - var cellAssessmentLayerTwoAForeColor = cellAssessmentLayerTwoA.Style.ForeColor; - var cellAssessmentLayerThreeBackColor = cellAssessmentLayerThree.Style.BackColor; - var cellAssessmentLayerThreeForeColor = cellAssessmentLayerThree.Style.ForeColor; - - if (checkBoxSelected) + if (assessmentLayerOneState == AssessmentLayerOneState.Sufficient) { - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), cellAssessmentLayerTwoABackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), cellAssessmentLayerTwoAForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), cellAssessmentLayerThreeBackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), cellAssessmentLayerThreeForeColor); + DataGridViewCellTester.AssertCellIsDisabled(cellAssessmentLayerTwoA); + DataGridViewCellTester.AssertCellIsDisabled(cellAssessmentLayerThree); + + Assert.IsTrue(cellAssessmentLayerThree.ReadOnly); } else { - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), cellAssessmentLayerTwoABackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), cellAssessmentLayerTwoAForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), cellAssessmentLayerThreeBackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), cellAssessmentLayerThreeForeColor); - } + DataGridViewCellTester.AssertCellIsEnabled(cellAssessmentLayerTwoA, true); + DataGridViewCellTester.AssertCellIsEnabled(cellAssessmentLayerThree); - Assert.AreEqual(checkBoxSelected, cellAssessmentLayerThree.ReadOnly); + Assert.IsFalse(cellAssessmentLayerThree.ReadOnly); + } } } @@ -450,32 +446,6 @@ } } - [Test] - public void FailureMechanismResultView_EditValueDirtyStateChangedEventFired_ValueCommittedCellInEditMode() - { - // Setup - using (HeightStructuresFailureMechanismResultView view = ShowFullyConfiguredFailureMechanismResultsView()) - { - var sections = (List) view.Data; - sections[0].AssessmentLayerOne = false; - - var gridTester = new ControlTester("dataGridView"); - var dataGridView = (DataGridView) gridTester.TheObject; - var dataGridViewCell = dataGridView.Rows[0].Cells[assessmentLayerOneIndex]; - - dataGridView.CurrentCell = dataGridViewCell; - dataGridView.BeginEdit(false); - gridTester.FireEvent("KeyUp", new KeyEventArgs(Keys.Space)); - - // Call - gridTester.FireEvent("CurrentCellDirtyStateChanged", EventArgs.Empty); - - // Assert - Assert.IsTrue(dataGridViewCell.IsInEditMode); - Assert.IsTrue(sections[0].AssessmentLayerOne); - } - } - private static FailureMechanismSection CreateSimpleFailureMechanismSection() { var section = new FailureMechanismSection("A", Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/DuneErosionResultView.cs =================================================================== diff -u -r814349430deb526dabf1cd5ac5bd71e0ff3597cb -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/DuneErosionResultView.cs (.../DuneErosionResultView.cs) (revision 814349430deb526dabf1cd5ac5bd71e0ff3597cb) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/DuneErosionResultView.cs (.../DuneErosionResultView.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -43,7 +43,6 @@ public DuneErosionResultView() { DataGridViewControl.AddCellFormattingHandler(DisableIrrelevantFieldsFormatting); - AddDataGridColumns(); } protected override object CreateFailureMechanismSectionResultRow(DuneErosionFailureMechanismSectionResult sectionResult) @@ -58,21 +57,16 @@ base.Dispose(disposing); } - private void AddDataGridColumns() + protected override void AddDataGridColumns() { + base.AddDataGridColumns(); + EnumDisplayWrapper[] twoAResultDataSource = Enum.GetValues(typeof(AssessmentLayerTwoAResult)) .OfType() .Select(el => new EnumDisplayWrapper(el)) .ToArray(); - DataGridViewControl.AddTextBoxColumn( - TypeUtils.GetMemberName(sr => sr.Name), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name, - true); - DataGridViewControl.AddCheckBoxColumn( - TypeUtils.GetMemberName(sr => sr.AssessmentLayerOne), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one); DataGridViewControl.AddComboBoxColumn( TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/GrassCoverSlipOffInwardsResultView.cs =================================================================== diff -u -r9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/GrassCoverSlipOffInwardsResultView.cs (.../GrassCoverSlipOffInwardsResultView.cs) (revision 9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/GrassCoverSlipOffInwardsResultView.cs (.../GrassCoverSlipOffInwardsResultView.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -45,8 +45,6 @@ public GrassCoverSlipOffInwardsResultView() { DataGridViewControl.AddCellFormattingHandler(OnCellFormatting); - - AddDataGridColumns(); } protected override object CreateFailureMechanismSectionResultRow(GrassCoverSlipOffInwardsFailureMechanismSectionResult sectionResult) @@ -61,36 +59,16 @@ base.Dispose(disposing); } - private void OnCellFormatting(object sender, DataGridViewCellFormattingEventArgs eventArgs) + protected override void AddDataGridColumns() { - if (eventArgs.ColumnIndex > assessmentLayerOneColumnIndex) - { - if (HasPassedLevelOne(eventArgs.RowIndex)) - { - DataGridViewControl.DisableCell(eventArgs.RowIndex, eventArgs.ColumnIndex); - } - else - { - DataGridViewControl.RestoreCell(eventArgs.RowIndex, eventArgs.ColumnIndex); - } - } - } + base.AddDataGridColumns(); - private void AddDataGridColumns() - { EnumDisplayWrapper[] twoAResultDataSource = Enum.GetValues(typeof(AssessmentLayerTwoAResult)) .OfType() .Select(el => new EnumDisplayWrapper(el)) .ToArray(); - DataGridViewControl.AddTextBoxColumn( - TypeUtils.GetMemberName(sr => sr.Name), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name, - true); - DataGridViewControl.AddCheckBoxColumn( - TypeUtils.GetMemberName(sr => sr.AssessmentLayerOne), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one); DataGridViewControl.AddComboBoxColumn( TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, @@ -101,5 +79,20 @@ TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three); } + + private void OnCellFormatting(object sender, DataGridViewCellFormattingEventArgs eventArgs) + { + if (eventArgs.ColumnIndex > assessmentLayerOneColumnIndex) + { + if (HasPassedLevelOne(eventArgs.RowIndex)) + { + DataGridViewControl.DisableCell(eventArgs.RowIndex, eventArgs.ColumnIndex); + } + else + { + DataGridViewControl.RestoreCell(eventArgs.RowIndex, eventArgs.ColumnIndex); + } + } + } } } \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/GrassCoverSlipOffOutwardsResultView.cs =================================================================== diff -u -r9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/GrassCoverSlipOffOutwardsResultView.cs (.../GrassCoverSlipOffOutwardsResultView.cs) (revision 9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/GrassCoverSlipOffOutwardsResultView.cs (.../GrassCoverSlipOffOutwardsResultView.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -45,8 +45,6 @@ public GrassCoverSlipOffOutwardsResultView() { DataGridViewControl.AddCellFormattingHandler(OnCellFormatting); - - AddDataGridColumns(); } protected override object CreateFailureMechanismSectionResultRow(GrassCoverSlipOffOutwardsFailureMechanismSectionResult sectionResult) @@ -61,36 +59,16 @@ base.Dispose(disposing); } - private void OnCellFormatting(object sender, DataGridViewCellFormattingEventArgs eventArgs) + protected override void AddDataGridColumns() { - if (eventArgs.ColumnIndex > assessmentLayerOneColumnIndex) - { - if (HasPassedLevelOne(eventArgs.RowIndex)) - { - DataGridViewControl.DisableCell(eventArgs.RowIndex, eventArgs.ColumnIndex); - } - else - { - DataGridViewControl.RestoreCell(eventArgs.RowIndex, eventArgs.ColumnIndex); - } - } - } + base.AddDataGridColumns(); - private void AddDataGridColumns() - { EnumDisplayWrapper[] twoAResultDataSource = Enum.GetValues(typeof(AssessmentLayerTwoAResult)) .OfType() .Select(el => new EnumDisplayWrapper(el)) .ToArray(); - DataGridViewControl.AddTextBoxColumn( - TypeUtils.GetMemberName(sr => sr.Name), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name, - true); - DataGridViewControl.AddCheckBoxColumn( - TypeUtils.GetMemberName(sr => sr.AssessmentLayerOne), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one); DataGridViewControl.AddComboBoxColumn( TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, @@ -101,5 +79,20 @@ TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three); } + + private void OnCellFormatting(object sender, DataGridViewCellFormattingEventArgs eventArgs) + { + if (eventArgs.ColumnIndex > assessmentLayerOneColumnIndex) + { + if (HasPassedLevelOne(eventArgs.RowIndex)) + { + DataGridViewControl.DisableCell(eventArgs.RowIndex, eventArgs.ColumnIndex); + } + else + { + DataGridViewControl.RestoreCell(eventArgs.RowIndex, eventArgs.ColumnIndex); + } + } + } } } \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MacrostabilityInwardsResultView.cs =================================================================== diff -u -r9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MacrostabilityInwardsResultView.cs (.../MacrostabilityInwardsResultView.cs) (revision 9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MacrostabilityInwardsResultView.cs (.../MacrostabilityInwardsResultView.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -41,8 +41,6 @@ public MacrostabilityInwardsResultView() { DataGridViewControl.AddCellFormattingHandler(OnCellFormatting); - - AddDataGridColumns(); } protected override object CreateFailureMechanismSectionResultRow(MacrostabilityInwardsFailureMechanismSectionResult sectionResult) @@ -57,16 +55,11 @@ base.Dispose(disposing); } - private void AddDataGridColumns() + protected override void AddDataGridColumns() { + base.AddDataGridColumns(); + DataGridViewControl.AddTextBoxColumn( - TypeUtils.GetMemberName(sr => sr.Name), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name, - true); - DataGridViewControl.AddCheckBoxColumn( - TypeUtils.GetMemberName(sr => sr.AssessmentLayerOne), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one); - DataGridViewControl.AddTextBoxColumn( TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a); DataGridViewControl.AddTextBoxColumn( Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MacrostabilityOutwardsResultView.cs =================================================================== diff -u -r9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MacrostabilityOutwardsResultView.cs (.../MacrostabilityOutwardsResultView.cs) (revision 9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MacrostabilityOutwardsResultView.cs (.../MacrostabilityOutwardsResultView.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -41,8 +41,6 @@ public MacrostabilityOutwardsResultView() { DataGridViewControl.AddCellFormattingHandler(OnCellFormatting); - - AddDataGridColumns(); } protected override object CreateFailureMechanismSectionResultRow(MacrostabilityOutwardsFailureMechanismSectionResult sectionResult) @@ -57,16 +55,11 @@ base.Dispose(disposing); } - private void AddDataGridColumns() + protected override void AddDataGridColumns() { + base.AddDataGridColumns(); + DataGridViewControl.AddTextBoxColumn( - TypeUtils.GetMemberName(sr => sr.Name), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name, - true); - DataGridViewControl.AddCheckBoxColumn( - TypeUtils.GetMemberName(sr => sr.AssessmentLayerOne), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one); - DataGridViewControl.AddTextBoxColumn( TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a); DataGridViewControl.AddTextBoxColumn( Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MicrostabilityResultView.cs =================================================================== diff -u -r9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MicrostabilityResultView.cs (.../MicrostabilityResultView.cs) (revision 9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MicrostabilityResultView.cs (.../MicrostabilityResultView.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -45,8 +45,6 @@ public MicrostabilityResultView() { DataGridViewControl.AddCellFormattingHandler(OnCellFormatting); - - AddDataGridColumns(); } protected override object CreateFailureMechanismSectionResultRow(MicrostabilityFailureMechanismSectionResult sectionResult) @@ -61,36 +59,16 @@ base.Dispose(disposing); } - private void OnCellFormatting(object sender, DataGridViewCellFormattingEventArgs eventArgs) + protected override void AddDataGridColumns() { - if (eventArgs.ColumnIndex > assessmentLayerOneColumnIndex) - { - if (HasPassedLevelOne(eventArgs.RowIndex)) - { - DataGridViewControl.DisableCell(eventArgs.RowIndex, eventArgs.ColumnIndex); - } - else - { - DataGridViewControl.RestoreCell(eventArgs.RowIndex, eventArgs.ColumnIndex); - } - } - } + base.AddDataGridColumns(); - private void AddDataGridColumns() - { EnumDisplayWrapper[] twoAResultDataSource = Enum.GetValues(typeof(AssessmentLayerTwoAResult)) .OfType() .Select(el => new EnumDisplayWrapper(el)) .ToArray(); - DataGridViewControl.AddTextBoxColumn( - TypeUtils.GetMemberName(sr => sr.Name), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name, - true); - DataGridViewControl.AddCheckBoxColumn( - TypeUtils.GetMemberName(sr => sr.AssessmentLayerOne), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one); DataGridViewControl.AddComboBoxColumn( TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, @@ -101,5 +79,20 @@ TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three); } + + private void OnCellFormatting(object sender, DataGridViewCellFormattingEventArgs eventArgs) + { + if (eventArgs.ColumnIndex > assessmentLayerOneColumnIndex) + { + if (HasPassedLevelOne(eventArgs.RowIndex)) + { + DataGridViewControl.DisableCell(eventArgs.RowIndex, eventArgs.ColumnIndex); + } + else + { + DataGridViewControl.RestoreCell(eventArgs.RowIndex, eventArgs.ColumnIndex); + } + } + } } } \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/PipingStructureResultView.cs =================================================================== diff -u -r9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/PipingStructureResultView.cs (.../PipingStructureResultView.cs) (revision 9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/PipingStructureResultView.cs (.../PipingStructureResultView.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -45,8 +45,6 @@ public PipingStructureResultView() { DataGridViewControl.AddCellFormattingHandler(OnCellFormatting); - - AddDataGridColumns(); } protected override object CreateFailureMechanismSectionResultRow(PipingStructureFailureMechanismSectionResult sectionResult) @@ -61,36 +59,16 @@ base.Dispose(disposing); } - private void OnCellFormatting(object sender, DataGridViewCellFormattingEventArgs eventArgs) + protected override void AddDataGridColumns() { - if (eventArgs.ColumnIndex > assessmentLayerOneColumnIndex) - { - if (HasPassedLevelOne(eventArgs.RowIndex)) - { - DataGridViewControl.DisableCell(eventArgs.RowIndex, eventArgs.ColumnIndex); - } - else - { - DataGridViewControl.RestoreCell(eventArgs.RowIndex, eventArgs.ColumnIndex); - } - } - } + base.AddDataGridColumns(); - private void AddDataGridColumns() - { EnumDisplayWrapper[] twoAResultDataSource = Enum.GetValues(typeof(AssessmentLayerTwoAResult)) .OfType() .Select(el => new EnumDisplayWrapper(el)) .ToArray(); - DataGridViewControl.AddTextBoxColumn( - TypeUtils.GetMemberName(sr => sr.Name), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name, - true); - DataGridViewControl.AddCheckBoxColumn( - TypeUtils.GetMemberName(sr => sr.AssessmentLayerOne), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one); DataGridViewControl.AddComboBoxColumn( TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, @@ -101,5 +79,20 @@ TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three); } + + private void OnCellFormatting(object sender, DataGridViewCellFormattingEventArgs eventArgs) + { + if (eventArgs.ColumnIndex > assessmentLayerOneColumnIndex) + { + if (HasPassedLevelOne(eventArgs.RowIndex)) + { + DataGridViewControl.DisableCell(eventArgs.RowIndex, eventArgs.ColumnIndex); + } + else + { + DataGridViewControl.RestoreCell(eventArgs.RowIndex, eventArgs.ColumnIndex); + } + } + } } } \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/StrengthStabilityLengthwiseConstructionResultView.cs =================================================================== diff -u -r9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/StrengthStabilityLengthwiseConstructionResultView.cs (.../StrengthStabilityLengthwiseConstructionResultView.cs) (revision 9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/StrengthStabilityLengthwiseConstructionResultView.cs (.../StrengthStabilityLengthwiseConstructionResultView.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -41,8 +41,6 @@ public StrengthStabilityLengthwiseConstructionResultView() { DataGridViewControl.AddCellFormattingHandler(OnCellFormatting); - - AddDataGridColumns(); } protected override object CreateFailureMechanismSectionResultRow(StrengthStabilityLengthwiseConstructionFailureMechanismSectionResult sectionResult) @@ -57,16 +55,11 @@ base.Dispose(disposing); } - private void AddDataGridColumns() + protected override void AddDataGridColumns() { + base.AddDataGridColumns(); + DataGridViewControl.AddTextBoxColumn( - TypeUtils.GetMemberName(sr => sr.Name), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name, - true); - DataGridViewControl.AddCheckBoxColumn( - TypeUtils.GetMemberName(sr => sr.AssessmentLayerOne), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one); - DataGridViewControl.AddTextBoxColumn( TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three); } Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/TechnicalInnovationResultView.cs =================================================================== diff -u -r9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/TechnicalInnovationResultView.cs (.../TechnicalInnovationResultView.cs) (revision 9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/TechnicalInnovationResultView.cs (.../TechnicalInnovationResultView.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -41,8 +41,6 @@ public TechnicalInnovationResultView() { DataGridViewControl.AddCellFormattingHandler(OnCellFormatting); - - AddDataGridColumns(); } protected override object CreateFailureMechanismSectionResultRow(TechnicalInnovationFailureMechanismSectionResult sectionResult) @@ -57,6 +55,15 @@ base.Dispose(disposing); } + protected override void AddDataGridColumns() + { + base.AddDataGridColumns(); + + DataGridViewControl.AddTextBoxColumn( + TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree), + RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three); + } + private void OnCellFormatting(object sender, DataGridViewCellFormattingEventArgs eventArgs) { if (eventArgs.ColumnIndex > assessmentLayerOneColumnIndex) @@ -71,19 +78,5 @@ } } } - - private void AddDataGridColumns() - { - DataGridViewControl.AddTextBoxColumn( - TypeUtils.GetMemberName(sr => sr.Name), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name, - true); - DataGridViewControl.AddCheckBoxColumn( - TypeUtils.GetMemberName(sr => sr.AssessmentLayerOne), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one); - DataGridViewControl.AddTextBoxColumn( - TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three); - } } } \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/WaterPressureAsphaltCoverResultView.cs =================================================================== diff -u -r9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/WaterPressureAsphaltCoverResultView.cs (.../WaterPressureAsphaltCoverResultView.cs) (revision 9a196c8bc554a2e97ff094d7ffb2e99c42eb04fd) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/WaterPressureAsphaltCoverResultView.cs (.../WaterPressureAsphaltCoverResultView.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -41,8 +41,6 @@ public WaterPressureAsphaltCoverResultView() { DataGridViewControl.AddCellFormattingHandler(OnCellFormatting); - - AddDataGridColumns(); } protected override object CreateFailureMechanismSectionResultRow(WaterPressureAsphaltCoverFailureMechanismSectionResult sectionResult) @@ -57,16 +55,11 @@ base.Dispose(disposing); } - private void AddDataGridColumns() + protected override void AddDataGridColumns() { + base.AddDataGridColumns(); + DataGridViewControl.AddTextBoxColumn( - TypeUtils.GetMemberName(sr => sr.Name), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name, - true); - DataGridViewControl.AddCheckBoxColumn( - TypeUtils.GetMemberName(sr => sr.AssessmentLayerOne), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one); - DataGridViewControl.AddTextBoxColumn( TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three); } Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj =================================================================== diff -u -r98f01944e8ac182e2a1e9b1ed4deb48a07952529 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision 98f01944e8ac182e2a1e9b1ed4deb48a07952529) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -193,6 +193,10 @@ {22E191F2-B2E3-413C-9511-4C2CDEDB2EFF} Ringtoets.ClosingStructures.Forms + + {d24fa2f7-28a7-413b-afd3-ee10e985630b} + Ringtoets.Common.Forms.TestUtil + {74CBA865-9338-447F-BAD9-28312446AE84} Ringtoets.HydraRing.Calculation.TestUtil Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/DuneErosionResultViewTest.cs =================================================================== diff -u -r814349430deb526dabf1cd5ac5bd71e0ff3597cb -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/DuneErosionResultViewTest.cs (.../DuneErosionResultViewTest.cs) (revision 814349430deb526dabf1cd5ac5bd71e0ff3597cb) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/DuneErosionResultViewTest.cs (.../DuneErosionResultViewTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -27,9 +27,9 @@ using NUnit.Framework; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.TestUtil; using Ringtoets.Integration.Data.StandAlone.SectionResults; using Ringtoets.Integration.Forms.Views.SectionResultViews; -using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.Integration.Forms.Test.Views.SectionResultViews { @@ -58,13 +58,13 @@ Assert.AreEqual(4, dataGridView.ColumnCount); - Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerTwoAIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerThreeIndex]); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one, dataGridView.Columns[assessmentLayerOneIndex].HeaderText); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three, dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); + Assert.AreEqual("Toetslaag 1", dataGridView.Columns[assessmentLayerOneIndex].HeaderText); + Assert.AreEqual("Toetslaag 2a", dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); + Assert.AreEqual("Toetslaag 3", dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); Assert.AreEqual(DataGridViewAutoSizeColumnsMode.AllCells, dataGridView.AutoSizeColumnsMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, dataGridView.ColumnHeadersDefaultCellStyle.Alignment); @@ -83,19 +83,30 @@ { new Point2D(0, 0) }); + var section3 = new FailureMechanismSection("Section 3", new[] + { + new Point2D(0, 0) + }); + Random random = new Random(21); var result1 = new DuneErosionFailureMechanismSectionResult(section1) { - AssessmentLayerOne = true, + AssessmentLayerOne = AssessmentLayerOneState.Sufficient, AssessmentLayerTwoA = AssessmentLayerTwoAResult.Failed, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; var result2 = new DuneErosionFailureMechanismSectionResult(section2) { - AssessmentLayerOne = true, + AssessmentLayerOne = AssessmentLayerOneState.NotAssessed, AssessmentLayerTwoA = AssessmentLayerTwoAResult.Successful, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; + var result3 = new DuneErosionFailureMechanismSectionResult(section3) + { + AssessmentLayerOne = AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerTwoA = AssessmentLayerTwoAResult.Successful, + AssessmentLayerThree = (RoundedDouble) random.NextDouble() + }; using (var form = new Form()) using (var view = new DuneErosionResultView()) @@ -107,28 +118,45 @@ view.Data = new[] { result1, - result2 + result2, + result3 }; // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; var rows = dataGridView.Rows; - Assert.AreEqual(2, rows.Count); + Assert.AreEqual(3, rows.Count); var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); Assert.AreEqual("Section 1", cells[nameColumnIndex].FormattedValue); - Assert.IsTrue((bool) cells[assessmentLayerOneIndex].Value); + Assert.AreEqual(result1.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); Assert.AreEqual(result1.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); Assert.AreEqual(result1.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + cells = rows[1].Cells; Assert.AreEqual(4, cells.Count); Assert.AreEqual("Section 2", cells[nameColumnIndex].FormattedValue); - Assert.IsTrue((bool) cells[assessmentLayerOneIndex].Value); + Assert.AreEqual(result2.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); Assert.AreEqual(result2.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); Assert.AreEqual(result2.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); + + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + + cells = rows[2].Cells; + Assert.AreEqual(4, cells.Count); + Assert.AreEqual("Section 3", cells[nameColumnIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); + Assert.AreEqual(result3.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); + Assert.AreEqual(result3.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); + + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); } } Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/GrassCoverSlipOffInwardsResultViewTest.cs =================================================================== diff -u -r2973c5f790a5131e427bd5f73e2a620044199639 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/GrassCoverSlipOffInwardsResultViewTest.cs (.../GrassCoverSlipOffInwardsResultViewTest.cs) (revision 2973c5f790a5131e427bd5f73e2a620044199639) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/GrassCoverSlipOffInwardsResultViewTest.cs (.../GrassCoverSlipOffInwardsResultViewTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -20,17 +20,16 @@ // All rights reserved. using System; -using System.Drawing; using System.Windows.Forms; using Core.Common.Base.Data; using Core.Common.Base.Geometry; using NUnit.Extensions.Forms; using NUnit.Framework; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.TestUtil; using Ringtoets.Integration.Data.StandAlone.SectionResults; using Ringtoets.Integration.Forms.Views.SectionResultViews; -using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.Integration.Forms.Test.Views.SectionResultViews { @@ -59,13 +58,13 @@ Assert.AreEqual(4, dataGridView.ColumnCount); - Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerTwoAIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerThreeIndex]); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one, dataGridView.Columns[assessmentLayerOneIndex].HeaderText); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three, dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); + Assert.AreEqual("Toetslaag 1", dataGridView.Columns[assessmentLayerOneIndex].HeaderText); + Assert.AreEqual("Toetslaag 2a", dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); + Assert.AreEqual("Toetslaag 3", dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); Assert.AreEqual(DataGridViewAutoSizeColumnsMode.AllCells, dataGridView.AutoSizeColumnsMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, dataGridView.ColumnHeadersDefaultCellStyle.Alignment); @@ -84,19 +83,29 @@ { new Point2D(0, 0) }); + var section3 = new FailureMechanismSection("Section 3", new[] + { + new Point2D(0, 0) + }); Random random = new Random(21); var result1 = new GrassCoverSlipOffInwardsFailureMechanismSectionResult(section1) { - AssessmentLayerOne = true, + AssessmentLayerOne = AssessmentLayerOneState.Sufficient, AssessmentLayerTwoA = AssessmentLayerTwoAResult.Failed, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; var result2 = new GrassCoverSlipOffInwardsFailureMechanismSectionResult(section2) { - AssessmentLayerOne = false, + AssessmentLayerOne = AssessmentLayerOneState.NotAssessed, AssessmentLayerTwoA = AssessmentLayerTwoAResult.Successful, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; + var result3 = new GrassCoverSlipOffInwardsFailureMechanismSectionResult(section3) + { + AssessmentLayerOne = AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerTwoA = AssessmentLayerTwoAResult.Successful, + AssessmentLayerThree = (RoundedDouble) random.NextDouble() + }; using (var form = new Form()) using (var view = new GrassCoverSlipOffInwardsResultView()) @@ -108,14 +117,15 @@ view.Data = new[] { result1, - result2 + result2, + result3 }; // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; var rows = dataGridView.Rows; - Assert.AreEqual(2, rows.Count); + Assert.AreEqual(3, rows.Count); var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); @@ -124,8 +134,8 @@ Assert.AreEqual(result1.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); Assert.AreEqual(result1.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); cells = rows[1].Cells; Assert.AreEqual(4, cells.Count); @@ -134,13 +144,26 @@ Assert.AreEqual(result2.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); Assert.AreEqual(result2.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + + cells = rows[2].Cells; + Assert.AreEqual(4, cells.Count); + Assert.AreEqual("Section 3", cells[nameColumnIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); + Assert.AreEqual(result3.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); + Assert.AreEqual(result3.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); + + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); } } [Test] - public void GivenFormWithGrassCoverSlipOffInwardsFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled() + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + public void GivenFormWithGrassCoverSlipOffInwardsFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled( + AssessmentLayerOneState assessmentLayerOneState) { // Given var section = new FailureMechanismSection("Section 1", new[] @@ -150,7 +173,7 @@ Random random = new Random(21); var result = new GrassCoverSlipOffInwardsFailureMechanismSectionResult(section) { - AssessmentLayerOne = false, + AssessmentLayerOne = assessmentLayerOneState, AssessmentLayerTwoA = AssessmentLayerTwoAResult.Failed, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; @@ -166,7 +189,7 @@ }; // When - result.AssessmentLayerOne = true; + result.AssessmentLayerOne = AssessmentLayerOneState.Sufficient; result.NotifyObservers(); // Then @@ -177,8 +200,8 @@ var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); } } @@ -216,19 +239,5 @@ Assert.AreEqual(0, rows.Count); } } - - private void AssertCellIsDisabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(true, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), dataGridViewCell.Style.BackColor); - } - - private void AssertCellIsEnabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(false, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), dataGridViewCell.Style.BackColor); - } } } \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/GrassCoverSlipOffOutwardsResultViewTest.cs =================================================================== diff -u -r2973c5f790a5131e427bd5f73e2a620044199639 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/GrassCoverSlipOffOutwardsResultViewTest.cs (.../GrassCoverSlipOffOutwardsResultViewTest.cs) (revision 2973c5f790a5131e427bd5f73e2a620044199639) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/GrassCoverSlipOffOutwardsResultViewTest.cs (.../GrassCoverSlipOffOutwardsResultViewTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -20,17 +20,16 @@ // All rights reserved. using System; -using System.Drawing; using System.Windows.Forms; using Core.Common.Base.Data; using Core.Common.Base.Geometry; using NUnit.Extensions.Forms; using NUnit.Framework; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.TestUtil; using Ringtoets.Integration.Data.StandAlone.SectionResults; using Ringtoets.Integration.Forms.Views.SectionResultViews; -using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.Integration.Forms.Test.Views.SectionResultViews { @@ -59,13 +58,13 @@ Assert.AreEqual(4, dataGridView.ColumnCount); - Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerTwoAIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerThreeIndex]); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one, dataGridView.Columns[assessmentLayerOneIndex].HeaderText); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three, dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); + Assert.AreEqual("Toetslaag 1", dataGridView.Columns[assessmentLayerOneIndex].HeaderText); + Assert.AreEqual("Toetslaag 2a", dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); + Assert.AreEqual("Toetslaag 3", dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); Assert.AreEqual(DataGridViewAutoSizeColumnsMode.AllCells, dataGridView.AutoSizeColumnsMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, dataGridView.ColumnHeadersDefaultCellStyle.Alignment); @@ -84,19 +83,29 @@ { new Point2D(0, 0) }); + var section3 = new FailureMechanismSection("Section 3", new[] + { + new Point2D(0, 0) + }); Random random = new Random(21); var result1 = new GrassCoverSlipOffOutwardsFailureMechanismSectionResult(section1) { - AssessmentLayerOne = true, + AssessmentLayerOne = AssessmentLayerOneState.Sufficient, AssessmentLayerTwoA = AssessmentLayerTwoAResult.Failed, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; var result2 = new GrassCoverSlipOffOutwardsFailureMechanismSectionResult(section2) { - AssessmentLayerOne = false, + AssessmentLayerOne = AssessmentLayerOneState.NotAssessed, AssessmentLayerTwoA = AssessmentLayerTwoAResult.Successful, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; + var result3 = new GrassCoverSlipOffOutwardsFailureMechanismSectionResult(section3) + { + AssessmentLayerOne = AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerTwoA = AssessmentLayerTwoAResult.Successful, + AssessmentLayerThree = (RoundedDouble) random.NextDouble() + }; using (var form = new Form()) using (var view = new GrassCoverSlipOffOutwardsResultView()) @@ -108,14 +117,15 @@ view.Data = new[] { result1, - result2 + result2, + result3 }; // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; var rows = dataGridView.Rows; - Assert.AreEqual(2, rows.Count); + Assert.AreEqual(3, rows.Count); var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); @@ -124,8 +134,8 @@ Assert.AreEqual(result1.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); Assert.AreEqual(result1.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); cells = rows[1].Cells; Assert.AreEqual(4, cells.Count); @@ -134,13 +144,26 @@ Assert.AreEqual(result2.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); Assert.AreEqual(result2.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + + cells = rows[2].Cells; + Assert.AreEqual(4, cells.Count); + Assert.AreEqual("Section 3", cells[nameColumnIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); + Assert.AreEqual(result3.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); + Assert.AreEqual(result3.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); + + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); } } [Test] - public void GivenFormWithGrassCoverSlipOffOutwardsFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled() + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + public void GivenFormWithGrassCoverSlipOffOutwardsFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled( + AssessmentLayerOneState assessmentLayerOneState) { // Given var section = new FailureMechanismSection("Section 1", new[] @@ -150,7 +173,7 @@ Random random = new Random(21); var result = new GrassCoverSlipOffOutwardsFailureMechanismSectionResult(section) { - AssessmentLayerOne = false, + AssessmentLayerOne = assessmentLayerOneState, AssessmentLayerTwoA = AssessmentLayerTwoAResult.Failed, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; @@ -166,7 +189,7 @@ }; // When - result.AssessmentLayerOne = true; + result.AssessmentLayerOne = AssessmentLayerOneState.Sufficient; result.NotifyObservers(); // Then @@ -177,8 +200,8 @@ var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); } } @@ -216,19 +239,5 @@ Assert.AreEqual(0, rows.Count); } } - - private void AssertCellIsDisabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(true, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), dataGridViewCell.Style.BackColor); - } - - private void AssertCellIsEnabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(false, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), dataGridViewCell.Style.BackColor); - } } } \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/MacrostabilityInwardsResultViewTest.cs =================================================================== diff -u -r2973c5f790a5131e427bd5f73e2a620044199639 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/MacrostabilityInwardsResultViewTest.cs (.../MacrostabilityInwardsResultViewTest.cs) (revision 2973c5f790a5131e427bd5f73e2a620044199639) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/MacrostabilityInwardsResultViewTest.cs (.../MacrostabilityInwardsResultViewTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -20,7 +20,6 @@ // All rights reserved. using System; -using System.Drawing; using System.Windows.Forms; using Core.Common.Base.Data; using Core.Common.Base.Geometry; @@ -29,10 +28,9 @@ using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.Helpers; +using Ringtoets.Common.Forms.TestUtil; using Ringtoets.Integration.Data.StandAlone.SectionResults; using Ringtoets.Integration.Forms.Views.SectionResultViews; -using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; -using CoreCommonBaseResources = Core.Common.Base.Properties.Resources; namespace Ringtoets.Integration.Forms.Test.Views.SectionResultViews { @@ -59,19 +57,13 @@ Assert.AreEqual(4, dataGridView.ColumnCount); - Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerTwoAIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerThreeIndex]); - Assert.AreEqual( - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one, - dataGridView.Columns[assessmentLayerOneIndex].HeaderText); - Assert.AreEqual( - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, - dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); - Assert.AreEqual( - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three, - dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); + Assert.AreEqual("Toetslaag 1", dataGridView.Columns[assessmentLayerOneIndex].HeaderText); + Assert.AreEqual("Toetslaag 2a", dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); + Assert.AreEqual("Toetslaag 3", dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); Assert.AreEqual(DataGridViewAutoSizeColumnsMode.AllCells, dataGridView.AutoSizeColumnsMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, dataGridView.ColumnHeadersDefaultCellStyle.Alignment); @@ -90,19 +82,30 @@ { new Point2D(0, 0) }); + var section3 = new FailureMechanismSection("Section 3", new[] + { + new Point2D(0, 0) + }); + Random random = new Random(21); var result1 = new MacrostabilityInwardsFailureMechanismSectionResult(section1) { - AssessmentLayerOne = true, + AssessmentLayerOne = AssessmentLayerOneState.Sufficient, AssessmentLayerTwoA = (RoundedDouble) random.NextDouble(), AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; var result2 = new MacrostabilityInwardsFailureMechanismSectionResult(section2) { - AssessmentLayerOne = false, + AssessmentLayerOne = AssessmentLayerOneState.NotAssessed, AssessmentLayerTwoA = (RoundedDouble) random.NextDouble(), AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; + var result3 = new MacrostabilityInwardsFailureMechanismSectionResult(section3) + { + AssessmentLayerOne = AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerTwoA = (RoundedDouble) random.NextDouble(), + AssessmentLayerThree = (RoundedDouble) random.NextDouble() + }; using (var form = new Form()) using (var view = new MacrostabilityInwardsResultView()) @@ -114,13 +117,14 @@ view.Data = new[] { result1, - result2 + result2, + result3 }; // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; var rows = dataGridView.Rows; - Assert.AreEqual(2, rows.Count); + Assert.AreEqual(3, rows.Count); var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); @@ -130,8 +134,8 @@ Assert.AreEqual(expectedAssessmentLayer2AString1, cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual(result1.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); cells = rows[1].Cells; Assert.AreEqual(4, cells.Count); @@ -141,13 +145,24 @@ Assert.AreEqual(expectedAssessmentLayer2AString2, cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual(result2.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + cells = rows[2].Cells; + Assert.AreEqual(4, cells.Count); + Assert.AreEqual("Section 3", cells[nameColumnIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); + var expectedAssessmentLayer2AString3 = ProbabilityFormattingHelper.Format(result3.AssessmentLayerTwoA); + Assert.AreEqual(expectedAssessmentLayer2AString3, cells[assessmentLayerTwoAIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); + + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); } } [Test] - public void GivenFormWithMacrostabilityInwardsFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled() + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + public void GivenFormWithMacrostabilityInwardsFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled( + AssessmentLayerOneState assessmentLayerOneState) { // Given var section = new FailureMechanismSection("Section 1", new[] @@ -157,7 +172,7 @@ Random random = new Random(21); var result = new MacrostabilityInwardsFailureMechanismSectionResult(section) { - AssessmentLayerOne = false, + AssessmentLayerOne = assessmentLayerOneState, AssessmentLayerTwoA = (RoundedDouble) random.NextDouble(), AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; @@ -173,7 +188,7 @@ }; // When - result.AssessmentLayerOne = true; + result.AssessmentLayerOne = AssessmentLayerOneState.Sufficient; result.NotifyObservers(); // Then @@ -184,8 +199,8 @@ var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); } } @@ -223,19 +238,5 @@ Assert.AreEqual(0, rows.Count); } } - - private void AssertCellIsDisabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(true, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), dataGridViewCell.Style.BackColor); - } - - private void AssertCellIsEnabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(false, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), dataGridViewCell.Style.BackColor); - } } } \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/MacrostabilityOutwardsResultViewTest.cs =================================================================== diff -u -r2973c5f790a5131e427bd5f73e2a620044199639 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/MacrostabilityOutwardsResultViewTest.cs (.../MacrostabilityOutwardsResultViewTest.cs) (revision 2973c5f790a5131e427bd5f73e2a620044199639) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/MacrostabilityOutwardsResultViewTest.cs (.../MacrostabilityOutwardsResultViewTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -20,7 +20,6 @@ // All rights reserved. using System; -using System.Drawing; using System.Windows.Forms; using Core.Common.Base.Data; using Core.Common.Base.Geometry; @@ -29,10 +28,9 @@ using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.Helpers; +using Ringtoets.Common.Forms.TestUtil; using Ringtoets.Integration.Data.StandAlone.SectionResults; using Ringtoets.Integration.Forms.Views.SectionResultViews; -using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; -using CoreCommonBaseResources = Core.Common.Base.Properties.Resources; namespace Ringtoets.Integration.Forms.Test.Views.SectionResultViews { @@ -59,19 +57,13 @@ Assert.AreEqual(4, dataGridView.ColumnCount); - Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerTwoAIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerThreeIndex]); - Assert.AreEqual( - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one, - dataGridView.Columns[assessmentLayerOneIndex].HeaderText); - Assert.AreEqual( - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, - dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); - Assert.AreEqual( - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three, - dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); + Assert.AreEqual("Toetslaag 1", dataGridView.Columns[assessmentLayerOneIndex].HeaderText); + Assert.AreEqual("Toetslaag 2a", dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); + Assert.AreEqual("Toetslaag 3", dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); Assert.AreEqual(DataGridViewAutoSizeColumnsMode.AllCells, dataGridView.AutoSizeColumnsMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, dataGridView.ColumnHeadersDefaultCellStyle.Alignment); @@ -90,19 +82,30 @@ { new Point2D(0, 0) }); + var section3 = new FailureMechanismSection("Section 3", new[] + { + new Point2D(0, 0) + }); + Random random = new Random(21); var result1 = new MacrostabilityOutwardsFailureMechanismSectionResult(section1) { - AssessmentLayerOne = true, + AssessmentLayerOne = AssessmentLayerOneState.Sufficient, AssessmentLayerTwoA = (RoundedDouble) random.NextDouble(), AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; var result2 = new MacrostabilityOutwardsFailureMechanismSectionResult(section2) { - AssessmentLayerOne = false, + AssessmentLayerOne = AssessmentLayerOneState.NotAssessed, AssessmentLayerTwoA = (RoundedDouble) random.NextDouble(), AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; + var result3 = new MacrostabilityOutwardsFailureMechanismSectionResult(section3) + { + AssessmentLayerOne = AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerTwoA = (RoundedDouble) random.NextDouble(), + AssessmentLayerThree = (RoundedDouble) random.NextDouble() + }; using (var form = new Form()) using (var view = new MacrostabilityOutwardsResultView()) @@ -114,13 +117,14 @@ view.Data = new[] { result1, - result2 + result2, + result3 }; // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; var rows = dataGridView.Rows; - Assert.AreEqual(2, rows.Count); + Assert.AreEqual(3, rows.Count); var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); @@ -130,8 +134,8 @@ Assert.AreEqual(expectedAssessmentLayer2AString1, cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual(result1.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); cells = rows[1].Cells; Assert.AreEqual(4, cells.Count); @@ -141,13 +145,27 @@ Assert.AreEqual(expectedAssessmentLayer2AString2, cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual(result2.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + + cells = rows[2].Cells; + Assert.AreEqual(4, cells.Count); + Assert.AreEqual("Section 3", cells[nameColumnIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); + var expectedAssessmentLayer2AString3 = ProbabilityFormattingHelper.Format(result3.AssessmentLayerTwoA); + Assert.AreEqual(expectedAssessmentLayer2AString3, cells[assessmentLayerTwoAIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); + + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); } } [Test] - public void GivenFormWithMacrostabilityOutwardsFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled() + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + public void GivenFormWithMacrostabilityOutwardsFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled( + AssessmentLayerOneState assessmentLayerOneState) { // Given var section = new FailureMechanismSection("Section 1", new[] @@ -157,7 +175,7 @@ Random random = new Random(21); var result = new MacrostabilityOutwardsFailureMechanismSectionResult(section) { - AssessmentLayerOne = false, + AssessmentLayerOne = assessmentLayerOneState, AssessmentLayerTwoA = (RoundedDouble) random.NextDouble(), AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; @@ -173,7 +191,7 @@ }; // When - result.AssessmentLayerOne = true; + result.AssessmentLayerOne = AssessmentLayerOneState.Sufficient; result.NotifyObservers(); // Then @@ -184,8 +202,8 @@ var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); } } @@ -223,19 +241,5 @@ Assert.AreEqual(0, rows.Count); } } - - private void AssertCellIsDisabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(true, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), dataGridViewCell.Style.BackColor); - } - - private void AssertCellIsEnabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(false, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), dataGridViewCell.Style.BackColor); - } } } \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/MicrostabilityResultViewTest.cs =================================================================== diff -u -r2973c5f790a5131e427bd5f73e2a620044199639 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/MicrostabilityResultViewTest.cs (.../MicrostabilityResultViewTest.cs) (revision 2973c5f790a5131e427bd5f73e2a620044199639) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/MicrostabilityResultViewTest.cs (.../MicrostabilityResultViewTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -20,17 +20,16 @@ // All rights reserved. using System; -using System.Drawing; using System.Windows.Forms; using Core.Common.Base.Data; using Core.Common.Base.Geometry; using NUnit.Extensions.Forms; using NUnit.Framework; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.TestUtil; using Ringtoets.Integration.Data.StandAlone.SectionResults; using Ringtoets.Integration.Forms.Views.SectionResultViews; -using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.Integration.Forms.Test.Views.SectionResultViews { @@ -59,13 +58,13 @@ Assert.AreEqual(4, dataGridView.ColumnCount); - Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerTwoAIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerThreeIndex]); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one, dataGridView.Columns[assessmentLayerOneIndex].HeaderText); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three, dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); + Assert.AreEqual("Toetslaag 1", dataGridView.Columns[assessmentLayerOneIndex].HeaderText); + Assert.AreEqual("Toetslaag 2a", dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); + Assert.AreEqual("Toetslaag 3", dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); Assert.AreEqual(DataGridViewAutoSizeColumnsMode.AllCells, dataGridView.AutoSizeColumnsMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, dataGridView.ColumnHeadersDefaultCellStyle.Alignment); @@ -84,19 +83,30 @@ { new Point2D(0, 0) }); + var section3 = new FailureMechanismSection("Section 3", new[] + { + new Point2D(0, 0) + }); + Random random = new Random(21); var result1 = new MicrostabilityFailureMechanismSectionResult(section1) { - AssessmentLayerOne = true, + AssessmentLayerOne = AssessmentLayerOneState.Sufficient, AssessmentLayerTwoA = AssessmentLayerTwoAResult.Failed, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; var result2 = new MicrostabilityFailureMechanismSectionResult(section2) { - AssessmentLayerOne = false, + AssessmentLayerOne = AssessmentLayerOneState.NotAssessed, AssessmentLayerTwoA = AssessmentLayerTwoAResult.Successful, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; + var result3 = new MicrostabilityFailureMechanismSectionResult(section3) + { + AssessmentLayerOne = AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerTwoA = AssessmentLayerTwoAResult.Successful, + AssessmentLayerThree = (RoundedDouble) random.NextDouble() + }; using (var form = new Form()) using (var view = new MicrostabilityResultView()) @@ -108,14 +118,15 @@ view.Data = new[] { result1, - result2 + result2, + result3 }; // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; var rows = dataGridView.Rows; - Assert.AreEqual(2, rows.Count); + Assert.AreEqual(3, rows.Count); var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); @@ -124,8 +135,8 @@ Assert.AreEqual(result1.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); Assert.AreEqual(result1.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); cells = rows[1].Cells; Assert.AreEqual(4, cells.Count); @@ -134,13 +145,26 @@ Assert.AreEqual(result2.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); Assert.AreEqual(result2.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + + cells = rows[2].Cells; + Assert.AreEqual(4, cells.Count); + Assert.AreEqual("Section 3", cells[nameColumnIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); + Assert.AreEqual(result3.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); + Assert.AreEqual(result3.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); + + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); } } [Test] - public void GivenFormWithMicrostabilityFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled() + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + public void GivenFormWithMicrostabilityFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled( + AssessmentLayerOneState assessmentLayerOneState) { // Given var section = new FailureMechanismSection("Section 1", new[] @@ -150,7 +174,7 @@ Random random = new Random(21); var result = new MicrostabilityFailureMechanismSectionResult(section) { - AssessmentLayerOne = false, + AssessmentLayerOne = assessmentLayerOneState, AssessmentLayerTwoA = AssessmentLayerTwoAResult.Failed, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; @@ -166,7 +190,7 @@ }; // When - result.AssessmentLayerOne = true; + result.AssessmentLayerOne = AssessmentLayerOneState.Sufficient; result.NotifyObservers(); // Then @@ -177,8 +201,8 @@ var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); } } @@ -216,19 +240,5 @@ Assert.AreEqual(0, rows.Count); } } - - private void AssertCellIsDisabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(true, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), dataGridViewCell.Style.BackColor); - } - - private void AssertCellIsEnabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(false, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), dataGridViewCell.Style.BackColor); - } } } \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/PipingStructureResultViewTest.cs =================================================================== diff -u -r2973c5f790a5131e427bd5f73e2a620044199639 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/PipingStructureResultViewTest.cs (.../PipingStructureResultViewTest.cs) (revision 2973c5f790a5131e427bd5f73e2a620044199639) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/PipingStructureResultViewTest.cs (.../PipingStructureResultViewTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -20,17 +20,16 @@ // All rights reserved. using System; -using System.Drawing; using System.Windows.Forms; using Core.Common.Base.Data; using Core.Common.Base.Geometry; using NUnit.Extensions.Forms; using NUnit.Framework; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.TestUtil; using Ringtoets.Integration.Data.StandAlone.SectionResults; using Ringtoets.Integration.Forms.Views.SectionResultViews; -using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.Integration.Forms.Test.Views.SectionResultViews { @@ -59,13 +58,13 @@ Assert.AreEqual(4, dataGridView.ColumnCount); - Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerTwoAIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerThreeIndex]); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one, dataGridView.Columns[assessmentLayerOneIndex].HeaderText); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three, dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); + Assert.AreEqual("Toetslaag 1", dataGridView.Columns[assessmentLayerOneIndex].HeaderText); + Assert.AreEqual("Toetslaag 2a", dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); + Assert.AreEqual("Toetslaag 3", dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); Assert.AreEqual(DataGridViewAutoSizeColumnsMode.AllCells, dataGridView.AutoSizeColumnsMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, dataGridView.ColumnHeadersDefaultCellStyle.Alignment); @@ -84,19 +83,30 @@ { new Point2D(0, 0) }); + var section3 = new FailureMechanismSection("Section 3", new[] + { + new Point2D(0, 0) + }); + Random random = new Random(21); var result1 = new PipingStructureFailureMechanismSectionResult(section1) { - AssessmentLayerOne = true, + AssessmentLayerOne = AssessmentLayerOneState.Sufficient, AssessmentLayerTwoA = AssessmentLayerTwoAResult.Failed, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; var result2 = new PipingStructureFailureMechanismSectionResult(section2) { - AssessmentLayerOne = false, + AssessmentLayerOne = AssessmentLayerOneState.NotAssessed, AssessmentLayerTwoA = AssessmentLayerTwoAResult.Successful, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; + var result3 = new PipingStructureFailureMechanismSectionResult(section3) + { + AssessmentLayerOne = AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerTwoA = AssessmentLayerTwoAResult.Successful, + AssessmentLayerThree = (RoundedDouble) random.NextDouble() + }; using (var form = new Form()) using (var view = new PipingStructureResultView()) @@ -108,14 +118,15 @@ view.Data = new[] { result1, - result2 + result2, + result3 }; // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; var rows = dataGridView.Rows; - Assert.AreEqual(2, rows.Count); + Assert.AreEqual(3, rows.Count); var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); @@ -124,8 +135,8 @@ Assert.AreEqual(result1.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); Assert.AreEqual(result1.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); cells = rows[1].Cells; Assert.AreEqual(4, cells.Count); @@ -134,13 +145,26 @@ Assert.AreEqual(result2.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); Assert.AreEqual(result2.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + + cells = rows[2].Cells; + Assert.AreEqual(4, cells.Count); + Assert.AreEqual("Section 3", cells[nameColumnIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); + Assert.AreEqual(result3.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); + Assert.AreEqual(result3.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); + + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); } } [Test] - public void GivenFormWithPipingStructureFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled() + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + public void GivenFormWithPipingStructureFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled( + AssessmentLayerOneState assessmentLayerOneState) { // Given var section = new FailureMechanismSection("Section 1", new[] @@ -150,7 +174,7 @@ Random random = new Random(21); var result = new PipingStructureFailureMechanismSectionResult(section) { - AssessmentLayerOne = false, + AssessmentLayerOne = assessmentLayerOneState, AssessmentLayerTwoA = AssessmentLayerTwoAResult.Failed, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; @@ -166,7 +190,7 @@ }; // When - result.AssessmentLayerOne = true; + result.AssessmentLayerOne = AssessmentLayerOneState.Sufficient; result.NotifyObservers(); // Then @@ -177,8 +201,8 @@ var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); } } @@ -216,19 +240,5 @@ Assert.AreEqual(0, rows.Count); } } - - private void AssertCellIsDisabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(true, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), dataGridViewCell.Style.BackColor); - } - - private void AssertCellIsEnabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(false, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), dataGridViewCell.Style.BackColor); - } } } \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/StrengthStabilityLengthwiseConstructionResultViewTest.cs =================================================================== diff -u -r2973c5f790a5131e427bd5f73e2a620044199639 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/StrengthStabilityLengthwiseConstructionResultViewTest.cs (.../StrengthStabilityLengthwiseConstructionResultViewTest.cs) (revision 2973c5f790a5131e427bd5f73e2a620044199639) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/StrengthStabilityLengthwiseConstructionResultViewTest.cs (.../StrengthStabilityLengthwiseConstructionResultViewTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -20,17 +20,16 @@ // All rights reserved. using System; -using System.Drawing; using System.Windows.Forms; using Core.Common.Base.Data; using Core.Common.Base.Geometry; using NUnit.Extensions.Forms; using NUnit.Framework; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.TestUtil; using Ringtoets.Integration.Data.StandAlone.SectionResults; using Ringtoets.Integration.Forms.Views.SectionResultViews; -using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.Integration.Forms.Test.Views.SectionResultViews { @@ -56,11 +55,11 @@ Assert.AreEqual(3, dataGridView.ColumnCount); - Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerThreeIndex]); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one, dataGridView.Columns[assessmentLayerOneIndex].HeaderText); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three, dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); + Assert.AreEqual("Toetslaag 1", dataGridView.Columns[assessmentLayerOneIndex].HeaderText); + Assert.AreEqual("Toetslaag 3", dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); Assert.AreEqual(DataGridViewAutoSizeColumnsMode.AllCells, dataGridView.AutoSizeColumnsMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, dataGridView.ColumnHeadersDefaultCellStyle.Alignment); @@ -79,17 +78,27 @@ { new Point2D(0, 0) }); + var section3 = new FailureMechanismSection("Section 3", new[] + { + new Point2D(0, 0) + }); + Random random = new Random(21); var result1 = new StrengthStabilityLengthwiseConstructionFailureMechanismSectionResult(section1) { - AssessmentLayerOne = true, + AssessmentLayerOne = AssessmentLayerOneState.Sufficient, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; var result2 = new StrengthStabilityLengthwiseConstructionFailureMechanismSectionResult(section2) { - AssessmentLayerOne = false, + AssessmentLayerOne = AssessmentLayerOneState.NotAssessed, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; + var result3 = new StrengthStabilityLengthwiseConstructionFailureMechanismSectionResult(section3) + { + AssessmentLayerOne = AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerThree = (RoundedDouble) random.NextDouble() + }; using (var form = new Form()) using (var view = new StrengthStabilityLengthwiseConstructionResultView()) @@ -101,34 +110,46 @@ view.Data = new[] { result1, - result2 + result2, + result3 }; // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; var rows = dataGridView.Rows; - Assert.AreEqual(2, rows.Count); + Assert.AreEqual(3, rows.Count); var cells = rows[0].Cells; Assert.AreEqual(3, cells.Count); Assert.AreEqual("Section 1", cells[nameColumnIndex].FormattedValue); Assert.AreEqual(result1.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); Assert.AreEqual(result1.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); cells = rows[1].Cells; Assert.AreEqual(3, cells.Count); Assert.AreEqual("Section 2", cells[nameColumnIndex].FormattedValue); Assert.AreEqual(result2.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); Assert.AreEqual(result2.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + + cells = rows[2].Cells; + Assert.AreEqual(3, cells.Count); + Assert.AreEqual("Section 3", cells[nameColumnIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); + Assert.AreEqual(result3.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); + + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); } } [Test] - public void GivenFormWithStrengthStabilityLengthwiseConstructionFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled() + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + public void GivenFormWithStrengthStabilityLengthwiseConstructionFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled( + AssessmentLayerOneState assessmentLayerOneState) { // Given var section = new FailureMechanismSection("Section 1", new[] @@ -138,7 +159,7 @@ Random random = new Random(21); var result = new StrengthStabilityLengthwiseConstructionFailureMechanismSectionResult(section) { - AssessmentLayerOne = false, + AssessmentLayerOne = assessmentLayerOneState, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; using (var form = new Form()) @@ -153,7 +174,7 @@ }; // When - result.AssessmentLayerOne = true; + result.AssessmentLayerOne = AssessmentLayerOneState.Sufficient; result.NotifyObservers(); // Then @@ -164,7 +185,7 @@ var cells = rows[0].Cells; Assert.AreEqual(3, cells.Count); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); } } @@ -202,19 +223,5 @@ Assert.AreEqual(0, rows.Count); } } - - private void AssertCellIsDisabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(true, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), dataGridViewCell.Style.BackColor); - } - - private void AssertCellIsEnabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(false, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), dataGridViewCell.Style.BackColor); - } } } \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/TechnicalInnovationResultViewTest.cs =================================================================== diff -u -r2973c5f790a5131e427bd5f73e2a620044199639 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/TechnicalInnovationResultViewTest.cs (.../TechnicalInnovationResultViewTest.cs) (revision 2973c5f790a5131e427bd5f73e2a620044199639) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/TechnicalInnovationResultViewTest.cs (.../TechnicalInnovationResultViewTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -20,14 +20,14 @@ // All rights reserved. using System; -using System.Drawing; using System.Windows.Forms; using Core.Common.Base.Data; using Core.Common.Base.Geometry; using NUnit.Extensions.Forms; using NUnit.Framework; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.TestUtil; using Ringtoets.Integration.Data.StandAlone.SectionResults; using Ringtoets.Integration.Forms.Views.SectionResultViews; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; @@ -58,11 +58,11 @@ Assert.AreEqual(3, dataGridView.ColumnCount); - Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerThreeIndex]); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one, dataGridView.Columns[assessmentLayerOneIndex].HeaderText); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three, dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); + Assert.AreEqual("Toetslaag 1", dataGridView.Columns[assessmentLayerOneIndex].HeaderText); + Assert.AreEqual("Toetslaag 3", dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); Assert.AreEqual(DataGridViewAutoSizeColumnsMode.AllCells, dataGridView.AutoSizeColumnsMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, dataGridView.ColumnHeadersDefaultCellStyle.Alignment); @@ -81,17 +81,27 @@ { new Point2D(0, 0) }); + var section3 = new FailureMechanismSection("Section 3", new[] + { + new Point2D(0, 0) + }); + Random random = new Random(21); var result1 = new TechnicalInnovationFailureMechanismSectionResult(section1) { - AssessmentLayerOne = true, + AssessmentLayerOne = AssessmentLayerOneState.Sufficient, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; var result2 = new TechnicalInnovationFailureMechanismSectionResult(section2) { - AssessmentLayerOne = false, + AssessmentLayerOne = AssessmentLayerOneState.NotAssessed, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; + var result3 = new TechnicalInnovationFailureMechanismSectionResult(section3) + { + AssessmentLayerOne = AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerThree = (RoundedDouble) random.NextDouble() + }; using (var form = new Form()) using (var view = new TechnicalInnovationResultView()) @@ -103,35 +113,47 @@ view.Data = new[] { result1, - result2 + result2, + result3 }; // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; var rows = dataGridView.Rows; - Assert.AreEqual(2, rows.Count); + Assert.AreEqual(3, rows.Count); var cells = rows[0].Cells; Assert.AreEqual(3, cells.Count); Assert.AreEqual("Section 1", cells[nameColumnIndex].FormattedValue); Assert.AreEqual(result1.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); Assert.AreEqual(result1.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); cells = rows[1].Cells; Assert.AreEqual(3, cells.Count); Assert.AreEqual("Section 2", cells[nameColumnIndex].FormattedValue); Assert.AreEqual(result2.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); Assert.AreEqual(result2.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + + cells = rows[2].Cells; + Assert.AreEqual(3, cells.Count); + Assert.AreEqual("Section 3", cells[nameColumnIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); + Assert.AreEqual(result3.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); + + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); } } [Test] - public void GivenFormWithTechnicalInnovationFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled() + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + public void GivenFormWithTechnicalInnovationFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled( + AssessmentLayerOneState assessmentLayerOneState) { // Given var section = new FailureMechanismSection("Section 1", new[] @@ -141,7 +163,7 @@ Random random = new Random(21); var result = new TechnicalInnovationFailureMechanismSectionResult(section) { - AssessmentLayerOne = false, + AssessmentLayerOne = assessmentLayerOneState, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; using (var form = new Form()) @@ -156,7 +178,7 @@ }; // When - result.AssessmentLayerOne = true; + result.AssessmentLayerOne = AssessmentLayerOneState.Sufficient; result.NotifyObservers(); // Then @@ -167,7 +189,7 @@ var cells = rows[0].Cells; Assert.AreEqual(3, cells.Count); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); } } @@ -205,19 +227,5 @@ Assert.AreEqual(0, rows.Count); } } - - private void AssertCellIsDisabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(true, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), dataGridViewCell.Style.BackColor); - } - - private void AssertCellIsEnabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(false, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), dataGridViewCell.Style.BackColor); - } } } \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/WaterPressureAsphaltCoverResultViewTest.cs =================================================================== diff -u -r2973c5f790a5131e427bd5f73e2a620044199639 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/WaterPressureAsphaltCoverResultViewTest.cs (.../WaterPressureAsphaltCoverResultViewTest.cs) (revision 2973c5f790a5131e427bd5f73e2a620044199639) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/WaterPressureAsphaltCoverResultViewTest.cs (.../WaterPressureAsphaltCoverResultViewTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -20,17 +20,16 @@ // All rights reserved. using System; -using System.Drawing; using System.Windows.Forms; using Core.Common.Base.Data; using Core.Common.Base.Geometry; using NUnit.Extensions.Forms; using NUnit.Framework; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.TestUtil; using Ringtoets.Integration.Data.StandAlone.SectionResults; using Ringtoets.Integration.Forms.Views.SectionResultViews; -using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.Integration.Forms.Test.Views.SectionResultViews { @@ -57,11 +56,11 @@ Assert.AreEqual(3, dataGridView.ColumnCount); - Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerThreeIndex]); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one, dataGridView.Columns[assessmentLayerOneIndex].HeaderText); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three, dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); + Assert.AreEqual("Toetslaag 1", dataGridView.Columns[assessmentLayerOneIndex].HeaderText); + Assert.AreEqual("Toetslaag 3", dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); Assert.AreEqual(DataGridViewAutoSizeColumnsMode.AllCells, dataGridView.AutoSizeColumnsMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, dataGridView.ColumnHeadersDefaultCellStyle.Alignment); @@ -81,17 +80,27 @@ { new Point2D(0, 0) }); + var section3 = new FailureMechanismSection("Section 3", new[] + { + new Point2D(0, 0) + }); + Random random = new Random(21); var result1 = new WaterPressureAsphaltCoverFailureMechanismSectionResult(section1) { - AssessmentLayerOne = true, + AssessmentLayerOne = AssessmentLayerOneState.Sufficient, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; var result2 = new WaterPressureAsphaltCoverFailureMechanismSectionResult(section2) { - AssessmentLayerOne = false, + AssessmentLayerOne = AssessmentLayerOneState.NotAssessed, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; + var result3 = new WaterPressureAsphaltCoverFailureMechanismSectionResult(section3) + { + AssessmentLayerOne = AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerThree = (RoundedDouble) random.NextDouble() + }; using (var form = new Form()) { @@ -104,35 +113,47 @@ view.Data = new[] { result1, - result2 + result2, + result3 }; // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; var rows = dataGridView.Rows; - Assert.AreEqual(2, rows.Count); + Assert.AreEqual(3, rows.Count); var cells = rows[0].Cells; Assert.AreEqual(3, cells.Count); Assert.AreEqual("Section 1", cells[nameColumnIndex].FormattedValue); Assert.AreEqual(result1.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); Assert.AreEqual(result1.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); cells = rows[1].Cells; Assert.AreEqual(3, cells.Count); Assert.AreEqual("Section 2", cells[nameColumnIndex].FormattedValue); Assert.AreEqual(result2.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); Assert.AreEqual(result2.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + + cells = rows[2].Cells; + Assert.AreEqual(3, cells.Count); + Assert.AreEqual("Section 3", cells[nameColumnIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); + Assert.AreEqual(result3.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); + + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); } } } [Test] - public void GivenFormWithSimpleFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled() + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + public void GivenFormWithSimpleFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled( + AssessmentLayerOneState assessmentLayerOneState) { // Given var section = new FailureMechanismSection("Section 1", new[] @@ -142,7 +163,7 @@ Random random = new Random(21); var result = new WaterPressureAsphaltCoverFailureMechanismSectionResult(section) { - AssessmentLayerOne = false, + AssessmentLayerOne = assessmentLayerOneState, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; using (var form = new Form()) @@ -158,7 +179,7 @@ }; // When - result.AssessmentLayerOne = true; + result.AssessmentLayerOne = AssessmentLayerOneState.Sufficient; result.NotifyObservers(); // Then @@ -169,7 +190,7 @@ var cells = rows[0].Cells; Assert.AreEqual(3, cells.Count); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); } } } @@ -210,19 +231,5 @@ } } } - - private void AssertCellIsDisabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(true, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), dataGridViewCell.Style.BackColor); - } - - private void AssertCellIsEnabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(false, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), dataGridViewCell.Style.BackColor); - } } } \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingFailureMechanismResultView.cs =================================================================== diff -u -rb7f496624546731a31137ae48d73c92456b1fe1d -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingFailureMechanismResultView.cs (.../PipingFailureMechanismResultView.cs) (revision b7f496624546731a31137ae48d73c92456b1fe1d) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingFailureMechanismResultView.cs (.../PipingFailureMechanismResultView.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -67,8 +67,6 @@ calculationGroupObserver = new RecursiveObserver( UpdateDataGridViewDataSource, c => c.Children); - - AddDataGridColumns(); } public override IFailureMechanism FailureMechanism @@ -107,16 +105,11 @@ return new PipingFailureMechanismSectionResultRow(sectionResult, FailureMechanism.Calculations.OfType()); } - private void AddDataGridColumns() + protected override void AddDataGridColumns() { + base.AddDataGridColumns(); + DataGridViewControl.AddTextBoxColumn( - TypeUtils.GetMemberName(sr => sr.Name), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name, - true); - DataGridViewControl.AddCheckBoxColumn( - TypeUtils.GetMemberName(sr => sr.AssessmentLayerOne), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one); - DataGridViewControl.AddTextBoxColumn( TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, true); @@ -157,7 +150,7 @@ var relevantScenarios = rowObject.GetCalculationScenarios(FailureMechanism.Calculations.OfType()).ToArray(); bool relevantScenarioAvailable = relevantScenarios.Length != 0; - if (rowObject.AssessmentLayerOne) + if (rowObject.AssessmentLayerOne == AssessmentLayerOneState.Sufficient) { currentDataGridViewCell.ErrorText = string.Empty; return; Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj =================================================================== diff -u -ra4da6760f40992a5db81766eb5c31e8586bad5ae -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj (.../Ringtoets.Piping.Forms.Test.csproj) (revision a4da6760f40992a5db81766eb5c31e8586bad5ae) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Ringtoets.Piping.Forms.Test.csproj (.../Ringtoets.Piping.Forms.Test.csproj) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -175,6 +175,10 @@ {4843d6e5-066f-4795-94f5-1d53932dd03c} Ringtoets.Common.Data.TestUtil + + {d24fa2f7-28a7-413b-afd3-ee10e985630b} + Ringtoets.Common.Forms.TestUtil + {70f8cc9c-5bc8-4fb2-b201-eae7fa8088c2} Ringtoets.HydraRing.Data Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingFailureMechanismResultViewTest.cs =================================================================== diff -u -rb7f496624546731a31137ae48d73c92456b1fe1d -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingFailureMechanismResultViewTest.cs (.../PipingFailureMechanismResultViewTest.cs) (revision b7f496624546731a31137ae48d73c92456b1fe1d) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingFailureMechanismResultViewTest.cs (.../PipingFailureMechanismResultViewTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -19,9 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; using System.Windows.Forms; using Core.Common.Base.Data; @@ -30,6 +28,7 @@ using NUnit.Extensions.Forms; using NUnit.Framework; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Forms.TestUtil; using Ringtoets.Piping.Data; using Ringtoets.Piping.Data.TestUtil; using Ringtoets.Piping.Forms.Views; @@ -81,15 +80,16 @@ Assert.AreEqual(4, dataGridView.ColumnCount); Assert.IsTrue(dataGridView.Columns[assessmentLayerTwoAIndex].ReadOnly); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerTwoAIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerThreeIndex]); + Assert.AreEqual("Toetslaag 1", dataGridView.Columns[assessmentLayerOneIndex].HeaderText); + Assert.AreEqual("Toetslaag 2a", dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); + Assert.AreEqual("Toetslaag 3", dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); + Assert.AreEqual(DataGridViewAutoSizeColumnsMode.AllCells, dataGridView.AutoSizeColumnsMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, dataGridView.ColumnHeadersDefaultCellStyle.Alignment); - - foreach (var column in dataGridView.Columns.OfType()) - { - Assert.AreEqual("This", column.ValueMember); - Assert.AreEqual("DisplayName", column.DisplayMember); - } } } @@ -162,30 +162,32 @@ var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); Assert.AreEqual("Section 1", cells[nameColumnIndex].FormattedValue); - Assert.IsFalse((bool) cells[assessmentLayerOneIndex].FormattedValue); + Assert.AreEqual(AssessmentLayerOneState.NotAssessed, cells[assessmentLayerOneIndex].Value); Assert.AreEqual("-", cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual("-", cells[assessmentLayerThreeIndex].FormattedValue); cells = rows[1].Cells; Assert.AreEqual(4, cells.Count); Assert.AreEqual("Section 2", cells[nameColumnIndex].FormattedValue); - Assert.IsFalse((bool) cells[assessmentLayerOneIndex].FormattedValue); + Assert.AreEqual(AssessmentLayerOneState.NotAssessed, cells[assessmentLayerOneIndex].Value); Assert.AreEqual("-", cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual("-", cells[assessmentLayerThreeIndex].FormattedValue); } } [Test] - [TestCase(true)] - [TestCase(false)] - public void FailureMechanismResultsView_ChangeCheckBox_DataGridViewCorrectlySyncedAndStylingSet(bool checkBoxSelected) + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + [TestCase(AssessmentLayerOneState.Sufficient)] + public void FailureMechanismResultsView_ChangeCheckBox_DataGridViewCorrectlySyncedAndStylingSet( + AssessmentLayerOneState assessmentLayerOneState) { // Setup using (ShowFullyConfiguredFailureMechanismResultsView(new PipingFailureMechanism())) { var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; - dataGridView.Rows[0].Cells[assessmentLayerOneIndex].Value = checkBoxSelected; + dataGridView.Rows[0].Cells[assessmentLayerOneIndex].Value = assessmentLayerOneState; // Assert var rows = dataGridView.Rows; @@ -196,31 +198,24 @@ var cellAssessmentLayerTwoA = cells[assessmentLayerTwoAIndex]; var cellAssessmentLayerThree = cells[assessmentLayerThreeIndex]; - Assert.AreEqual(checkBoxSelected, (bool) cells[assessmentLayerOneIndex].FormattedValue); + Assert.AreEqual(assessmentLayerOneState, cells[assessmentLayerOneIndex].Value); Assert.AreEqual("-", cellAssessmentLayerTwoA.FormattedValue); Assert.AreEqual("-", cellAssessmentLayerThree.FormattedValue); - var cellAssessmentLayerTwoABackColor = cellAssessmentLayerTwoA.Style.BackColor; - var cellAssessmentLayerTwoAForeColor = cellAssessmentLayerTwoA.Style.ForeColor; - var cellAssessmentLayerThreeBackColor = cellAssessmentLayerThree.Style.BackColor; - var cellAssessmentLayerThreeForeColor = cellAssessmentLayerThree.Style.ForeColor; - - if (checkBoxSelected) + if (assessmentLayerOneState == AssessmentLayerOneState.Sufficient) { - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), cellAssessmentLayerTwoABackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), cellAssessmentLayerTwoAForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), cellAssessmentLayerThreeBackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), cellAssessmentLayerThreeForeColor); + DataGridViewCellTester.AssertCellIsDisabled(cellAssessmentLayerTwoA); + DataGridViewCellTester.AssertCellIsDisabled(cellAssessmentLayerThree); + + Assert.IsTrue(cellAssessmentLayerThree.ReadOnly); } else { - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), cellAssessmentLayerTwoABackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), cellAssessmentLayerTwoAForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), cellAssessmentLayerThreeBackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), cellAssessmentLayerThreeForeColor); - } + DataGridViewCellTester.AssertCellIsEnabled(cellAssessmentLayerTwoA, true); + DataGridViewCellTester.AssertCellIsEnabled(cellAssessmentLayerThree); - Assert.AreEqual(checkBoxSelected, cellAssessmentLayerThree.ReadOnly); + Assert.IsFalse(cellAssessmentLayerThree.ReadOnly); + } } } @@ -271,32 +266,6 @@ } [Test] - public void FailureMechanismResultView_EditValueDirtyStateChangedEventFired_ValueCommittedCellInEditMode() - { - // Setup - using (var view = ShowFullyConfiguredFailureMechanismResultsView(new PipingFailureMechanism())) - { - var sections = (List) view.Data; - sections[0].AssessmentLayerOne = false; - - var gridTester = new ControlTester("dataGridView"); - var dataGridView = (DataGridView) gridTester.TheObject; - var dataGridViewCell = dataGridView.Rows[0].Cells[assessmentLayerOneIndex]; - - dataGridView.CurrentCell = dataGridViewCell; - dataGridView.BeginEdit(false); - gridTester.FireEvent("KeyUp", new KeyEventArgs(Keys.Space)); - - // Call - gridTester.FireEvent("CurrentCellDirtyStateChanged", EventArgs.Empty); - - // Assert - Assert.IsTrue(dataGridViewCell.IsInEditMode); - Assert.IsTrue(sections[0].AssessmentLayerOne); - } - } - - [Test] public void FailureMechanismResultView_TotalContributionNotHundred_ShowsErrorTooltip() { // Setup @@ -466,7 +435,7 @@ } [Test] - public void FailureMechanismResultView_AssessmentLayerOneTrueAndAssessmentLayerTwoAHasError_DoesNotShowError() + public void FailureMechanismResultView_AssessmentLayerOneStateSufficientAndAssessmentLayerTwoAHasError_DoesNotShowError() { // Setup var rowIndex = 0; @@ -484,7 +453,7 @@ DataGridViewCell dataGridViewCell = dataGridView.Rows[rowIndex].Cells[assessmentLayerTwoAIndex]; // Call - dataGridView.Rows[rowIndex].Cells[assessmentLayerOneIndex].Value = true; + dataGridView.Rows[rowIndex].Cells[assessmentLayerOneIndex].Value = AssessmentLayerOneState.Sufficient; object formattedValue = dataGridViewCell.FormattedValue; // Need to do this to fire the CellFormatting event. // Assert Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismResultView.cs =================================================================== diff -u -r4c6816a0272d6b38fb78d2d562b85248aa755e5d -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismResultView.cs (.../StabilityPointStructuresFailureMechanismResultView.cs) (revision 4c6816a0272d6b38fb78d2d562b85248aa755e5d) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismResultView.cs (.../StabilityPointStructuresFailureMechanismResultView.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -66,8 +66,6 @@ calculationGroupObserver = new RecursiveObserver( UpdateDataGridViewDataSource, c => c.Children); - - AddDataGridColumns(); } public override IFailureMechanism FailureMechanism @@ -104,16 +102,11 @@ base.Dispose(disposing); } - private void AddDataGridColumns() + protected override void AddDataGridColumns() { + base.AddDataGridColumns(); + DataGridViewControl.AddTextBoxColumn( - TypeUtils.GetMemberName(sr => sr.Name), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name, - true); - DataGridViewControl.AddCheckBoxColumn( - TypeUtils.GetMemberName(sr => sr.AssessmentLayerOne), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one); - DataGridViewControl.AddTextBoxColumn( TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a); DataGridViewControl.AddTextBoxColumn( Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Ringtoets.StabilityPointStructures.Forms.Test.csproj =================================================================== diff -u -reab8aad1da52fe14404e06a6cc684dd6c391abe4 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Ringtoets.StabilityPointStructures.Forms.Test.csproj (.../Ringtoets.StabilityPointStructures.Forms.Test.csproj) (revision eab8aad1da52fe14404e06a6cc684dd6c391abe4) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Ringtoets.StabilityPointStructures.Forms.Test.csproj (.../Ringtoets.StabilityPointStructures.Forms.Test.csproj) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -149,6 +149,10 @@ {4843D6E5-066F-4795-94F5-1D53932DD03C} Ringtoets.Common.Data.TestUtil + + {d24fa2f7-28a7-413b-afd3-ee10e985630b} + Ringtoets.Common.Forms.TestUtil + {888d4097-8bc2-4703-9fb1-8744c94d525e} Ringtoets.HydraRing.Calculation Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismResultViewTest.cs =================================================================== diff -u -rb7f496624546731a31137ae48d73c92456b1fe1d -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismResultViewTest.cs (.../StabilityPointStructuresFailureMechanismResultViewTest.cs) (revision b7f496624546731a31137ae48d73c92456b1fe1d) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismResultViewTest.cs (.../StabilityPointStructuresFailureMechanismResultViewTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -21,7 +21,6 @@ using System; using System.Collections.Generic; -using System.Drawing; using System.Windows.Forms; using Core.Common.Base.Data; using Core.Common.Base.Geometry; @@ -32,10 +31,10 @@ using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Forms.Helpers; +using Ringtoets.Common.Forms.TestUtil; using Ringtoets.Common.Forms.Views; using Ringtoets.StabilityPointStructures.Data; using Ringtoets.StabilityPointStructures.Forms.Views; -using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.StabilityPointStructures.Forms.Test.Views { @@ -136,32 +135,34 @@ DataGridViewCellCollection cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); Assert.AreEqual("Section 1", cells[nameColumnIndex].FormattedValue); - Assert.IsFalse((bool) cells[assessmentLayerOneIndex].FormattedValue); + Assert.AreEqual(AssessmentLayerOneState.NotAssessed, cells[assessmentLayerOneIndex].Value); Assert.AreEqual("-", cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual("-", cells[assessmentLayerThreeIndex].FormattedValue); cells = rows[1].Cells; Assert.AreEqual(4, cells.Count); Assert.AreEqual("Section 2", cells[nameColumnIndex].FormattedValue); - Assert.IsFalse((bool) cells[assessmentLayerOneIndex].FormattedValue); + Assert.AreEqual(AssessmentLayerOneState.NotAssessed, cells[assessmentLayerOneIndex].Value); Assert.AreEqual("-", cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual("-", cells[assessmentLayerThreeIndex].FormattedValue); } } [Test] [SetCulture("nl-NL")] - [TestCase(true)] - [TestCase(false)] - public void FailureMechanismResultsView_ChangeCheckBox_DataGridViewCorrectlySyncedAndStylingSet(bool checkBoxSelected) + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + [TestCase(AssessmentLayerOneState.Sufficient)] + public void FailureMechanismResultsView_ChangeCheckBox_DataGridViewCorrectlySyncedAndStylingSet( + AssessmentLayerOneState assessmentLayerOneState) { // Setup using (CreateConfiguredFailureMechanismResultsView()) { var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; // Call - dataGridView.Rows[0].Cells[assessmentLayerOneIndex].Value = checkBoxSelected; + dataGridView.Rows[0].Cells[assessmentLayerOneIndex].Value = assessmentLayerOneState; // Assert var rows = dataGridView.Rows; @@ -173,32 +174,25 @@ var cellAssessmentLayerThree = cells[assessmentLayerThreeIndex]; DataGridViewCell dataGridViewCell = cells[assessmentLayerOneIndex]; - Assert.AreEqual(checkBoxSelected, (bool) dataGridViewCell.FormattedValue); + Assert.AreEqual(assessmentLayerOneState, dataGridViewCell.Value); Assert.AreEqual("-", cellAssessmentLayerTwoA.FormattedValue); Assert.AreEqual("-", cellAssessmentLayerThree.FormattedValue); Assert.IsEmpty(dataGridViewCell.ErrorText); - var cellAssessmentLayerTwoABackColor = cellAssessmentLayerTwoA.Style.BackColor; - var cellAssessmentLayerTwoAForeColor = cellAssessmentLayerTwoA.Style.ForeColor; - var cellAssessmentLayerThreeBackColor = cellAssessmentLayerThree.Style.BackColor; - var cellAssessmentLayerThreeForeColor = cellAssessmentLayerThree.Style.ForeColor; - - if (checkBoxSelected) + if (assessmentLayerOneState == AssessmentLayerOneState.Sufficient) { - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), cellAssessmentLayerTwoABackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), cellAssessmentLayerTwoAForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), cellAssessmentLayerThreeBackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), cellAssessmentLayerThreeForeColor); + DataGridViewCellTester.AssertCellIsDisabled(cellAssessmentLayerTwoA); + DataGridViewCellTester.AssertCellIsDisabled(cellAssessmentLayerThree); + + Assert.IsTrue(cellAssessmentLayerThree.ReadOnly); } else { - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), cellAssessmentLayerTwoABackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), cellAssessmentLayerTwoAForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), cellAssessmentLayerThreeBackColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), cellAssessmentLayerThreeForeColor); - } + DataGridViewCellTester.AssertCellIsEnabled(cellAssessmentLayerTwoA, true); + DataGridViewCellTester.AssertCellIsEnabled(cellAssessmentLayerThree); - Assert.AreEqual(checkBoxSelected, cellAssessmentLayerThree.ReadOnly); + Assert.IsFalse(cellAssessmentLayerThree.ReadOnly); + } } } @@ -213,19 +207,13 @@ Assert.AreEqual(4, dataGridView.ColumnCount); - Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerTwoAIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerThreeIndex]); - Assert.AreEqual( - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one, - dataGridView.Columns[assessmentLayerOneIndex].HeaderText); - Assert.AreEqual( - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, - dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); - Assert.AreEqual( - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three, - dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); + Assert.AreEqual("Toetslaag 1", dataGridView.Columns[assessmentLayerOneIndex].HeaderText); + Assert.AreEqual("Toetslaag 2a", dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); + Assert.AreEqual("Toetslaag 3", dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); Assert.AreEqual(DataGridViewAutoSizeColumnsMode.AllCells, dataGridView.AutoSizeColumnsMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, dataGridView.ColumnHeadersDefaultCellStyle.Alignment); @@ -244,31 +232,42 @@ { new Point2D(0, 0) }); + var section3 = new FailureMechanismSection("Section 3", new[] + { + new Point2D(0, 0) + }); + Random random = new Random(21); var result1 = new StabilityPointStructuresFailureMechanismSectionResult(section1) { - AssessmentLayerOne = true, + AssessmentLayerOne = AssessmentLayerOneState.Sufficient, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; var result2 = new StabilityPointStructuresFailureMechanismSectionResult(section2) { - AssessmentLayerOne = false, + AssessmentLayerOne = AssessmentLayerOneState.NotAssessed, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; + var result3 = new StabilityPointStructuresFailureMechanismSectionResult(section3) + { + AssessmentLayerOne = AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerThree = (RoundedDouble) random.NextDouble() + }; using (var view = ShowFailureMechanismResultsView()) { // When view.Data = new[] { result1, - result2 + result2, + result3 }; // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; DataGridViewRowCollection rows = dataGridView.Rows; - Assert.AreEqual(2, rows.Count); + Assert.AreEqual(3, rows.Count); DataGridViewCellCollection cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); @@ -278,8 +277,8 @@ Assert.AreEqual("-", cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual(result1.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); cells = rows[1].Cells; Assert.AreEqual(4, cells.Count); @@ -288,13 +287,26 @@ Assert.AreEqual("-", cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual(result2.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsEnabled(cells[assessmentLayerTwoAIndex], true); - AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex], true); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + + cells = rows[2].Cells; + Assert.AreEqual(4, cells.Count); + Assert.AreEqual("Section 3", cells[nameColumnIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); + Assert.AreEqual("-", cells[assessmentLayerTwoAIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); + + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex], true); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); } } [Test] - public void GivenFormWithFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled() + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + public void GivenFormWithFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled( + AssessmentLayerOneState assessmentLayerOneState) { // Given var section = new FailureMechanismSection("Section 1", new[] @@ -304,7 +316,7 @@ Random random = new Random(21); var result = new StabilityPointStructuresFailureMechanismSectionResult(section) { - AssessmentLayerOne = false, + AssessmentLayerOne = assessmentLayerOneState, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; using (var view = ShowFailureMechanismResultsView()) @@ -315,7 +327,7 @@ }; // When - result.AssessmentLayerOne = true; + result.AssessmentLayerOne = AssessmentLayerOneState.Sufficient; result.NotifyObservers(); // Then @@ -326,8 +338,8 @@ DataGridViewCellCollection cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); } } @@ -544,20 +556,6 @@ return section; } - private static void AssertCellIsDisabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(true, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), dataGridViewCell.Style.BackColor); - } - - private static void AssertCellIsEnabled(DataGridViewCell dataGridViewCell, bool readOnly = false) - { - Assert.AreEqual(readOnly, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), dataGridViewCell.Style.BackColor); - } - private StabilityPointStructuresFailureMechanismResultView CreateConfiguredFailureMechanismResultsView() { var failureMechanism = new StabilityPointStructuresFailureMechanism(); Index: Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/Views/StabilityStoneCoverResultView.cs =================================================================== diff -u -r673e35de0df920529e5dda63ea8b4dfb08ed65a8 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/Views/StabilityStoneCoverResultView.cs (.../StabilityStoneCoverResultView.cs) (revision 673e35de0df920529e5dda63ea8b4dfb08ed65a8) +++ Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/Views/StabilityStoneCoverResultView.cs (.../StabilityStoneCoverResultView.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -42,7 +42,6 @@ public StabilityStoneCoverResultView() { DataGridViewControl.AddCellFormattingHandler(DisableIrrelevantFieldsFormatting); - AddDataGridColumns(); } protected override object CreateFailureMechanismSectionResultRow(StabilityStoneCoverFailureMechanismSectionResult sectionResult) @@ -57,21 +56,16 @@ base.Dispose(disposing); } - private void AddDataGridColumns() + protected override void AddDataGridColumns() { + base.AddDataGridColumns(); + EnumDisplayWrapper[] twoAResultDataSource = Enum.GetValues(typeof(AssessmentLayerTwoAResult)) .OfType() .Select(el => new EnumDisplayWrapper(el)) .ToArray(); - DataGridViewControl.AddTextBoxColumn( - TypeUtils.GetMemberName(sr => sr.Name), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name, - true); - DataGridViewControl.AddCheckBoxColumn( - TypeUtils.GetMemberName(sr => sr.AssessmentLayerOne), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one); DataGridViewControl.AddComboBoxColumn( TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, Index: Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/Ringtoets.StabilityStoneCover.Forms.Test.csproj =================================================================== diff -u -rf718135c08ce7b90cc0eaf40bfb83c9af48a1776 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/Ringtoets.StabilityStoneCover.Forms.Test.csproj (.../Ringtoets.StabilityStoneCover.Forms.Test.csproj) (revision f718135c08ce7b90cc0eaf40bfb83c9af48a1776) +++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/Ringtoets.StabilityStoneCover.Forms.Test.csproj (.../Ringtoets.StabilityStoneCover.Forms.Test.csproj) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -159,6 +159,10 @@ Ringtoets.Common.Data.TestUtil True + + {d24fa2f7-28a7-413b-afd3-ee10e985630b} + Ringtoets.Common.Forms.TestUtil + {70f8cc9c-5bc8-4fb2-b201-eae7fa8088c2} Ringtoets.HydraRing.Data Index: Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/Views/StabilityStoneCoverResultViewTest.cs =================================================================== diff -u -rcbdf2dd6e4431d3f3517475b5ebd5409c11df539 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/Views/StabilityStoneCoverResultViewTest.cs (.../StabilityStoneCoverResultViewTest.cs) (revision cbdf2dd6e4431d3f3517475b5ebd5409c11df539) +++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/Views/StabilityStoneCoverResultViewTest.cs (.../StabilityStoneCoverResultViewTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -27,9 +27,9 @@ using NUnit.Framework; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.TestUtil; using Ringtoets.StabilityStoneCover.Data; using Ringtoets.StabilityStoneCover.Forms.Views; -using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.StabilityStoneCover.Forms.Test.Views { @@ -58,16 +58,13 @@ Assert.AreEqual(4, dataGridView.ColumnCount); - Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerTwoAIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerThreeIndex]); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one, - dataGridView.Columns[assessmentLayerOneIndex].HeaderText); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, - dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three, - dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); + Assert.AreEqual("Toetslaag 1", dataGridView.Columns[assessmentLayerOneIndex].HeaderText); + Assert.AreEqual("Toetslaag 2a", dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); + Assert.AreEqual("Toetslaag 3", dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); Assert.AreEqual(DataGridViewAutoSizeColumnsMode.AllCells, dataGridView.AutoSizeColumnsMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, dataGridView.ColumnHeadersDefaultCellStyle.Alignment); @@ -86,19 +83,30 @@ { new Point2D(0, 0) }); + var section3 = new FailureMechanismSection("Section 3", new[] + { + new Point2D(0, 0) + }); + Random random = new Random(21); var result1 = new StabilityStoneCoverFailureMechanismSectionResult(section1) { - AssessmentLayerOne = true, + AssessmentLayerOne = AssessmentLayerOneState.Sufficient, AssessmentLayerTwoA = AssessmentLayerTwoAResult.Failed, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; var result2 = new StabilityStoneCoverFailureMechanismSectionResult(section2) { - AssessmentLayerOne = true, + AssessmentLayerOne = AssessmentLayerOneState.NotAssessed, AssessmentLayerTwoA = AssessmentLayerTwoAResult.Successful, AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; + var result3 = new StabilityStoneCoverFailureMechanismSectionResult(section3) + { + AssessmentLayerOne = AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerTwoA = AssessmentLayerTwoAResult.Successful, + AssessmentLayerThree = (RoundedDouble) random.NextDouble() + }; using (var form = new Form()) using (var view = new StabilityStoneCoverResultView()) @@ -110,32 +118,97 @@ view.Data = new[] { result1, - result2 + result2, + result3 }; // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; var rows = dataGridView.Rows; - Assert.AreEqual(2, rows.Count); + Assert.AreEqual(3, rows.Count); var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); Assert.AreEqual("Section 1", cells[nameColumnIndex].FormattedValue); - Assert.IsTrue((bool) cells[assessmentLayerOneIndex].Value); + Assert.AreEqual(result1.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); Assert.AreEqual(result1.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); Assert.AreEqual(result1.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + cells = rows[1].Cells; Assert.AreEqual(4, cells.Count); Assert.AreEqual("Section 2", cells[nameColumnIndex].FormattedValue); - Assert.IsTrue((bool) cells[assessmentLayerOneIndex].Value); + Assert.AreEqual(result2.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); Assert.AreEqual(result2.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); Assert.AreEqual(result2.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); + + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + + cells = rows[2].Cells; + Assert.AreEqual(4, cells.Count); + Assert.AreEqual("Section 3", cells[nameColumnIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); + Assert.AreEqual(result3.AssessmentLayerTwoA, cells[assessmentLayerTwoAIndex].Value); + Assert.AreEqual(result3.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); + + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); } } [Test] + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + public void GivenFormWithSimpleFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled( + AssessmentLayerOneState assessmentLayerOneState) + { + // Given + var section = new FailureMechanismSection("Section 1", new[] + { + new Point2D(0, 0) + }); + Random random = new Random(21); + var result = new StabilityStoneCoverFailureMechanismSectionResult(section) + { + AssessmentLayerOne = assessmentLayerOneState, + AssessmentLayerTwoA = AssessmentLayerTwoAResult.Failed, + AssessmentLayerThree = (RoundedDouble) random.NextDouble() + }; + using (var form = new Form()) + { + using (var view = new StabilityStoneCoverResultView()) + { + form.Controls.Add(view); + form.Show(); + + view.Data = new[] + { + result + }; + + // When + result.AssessmentLayerOne = AssessmentLayerOneState.Sufficient; + result.NotifyObservers(); + + // Then + var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; + var rows = dataGridView.Rows; + Assert.AreEqual(1, rows.Count); + + var cells = rows[0].Cells; + Assert.AreEqual(4, cells.Count); + + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + } + } + } + + [Test] public void GivenFormWithStabilityStoneCoverFailureMechanismResultView_WhenDataSourceWithOtherFailureMechanismSectionResultAssigned_ThenSectionsNotAdded() { // Given Index: Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Forms/Views/WaveImpactAsphaltCoverFailureMechanismResultView.cs =================================================================== diff -u -r944d2501b3f780d208e00015a1b850afad4c3aa8 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Forms/Views/WaveImpactAsphaltCoverFailureMechanismResultView.cs (.../WaveImpactAsphaltCoverFailureMechanismResultView.cs) (revision 944d2501b3f780d208e00015a1b850afad4c3aa8) +++ Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Forms/Views/WaveImpactAsphaltCoverFailureMechanismResultView.cs (.../WaveImpactAsphaltCoverFailureMechanismResultView.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -40,8 +40,6 @@ public WaveImpactAsphaltCoverFailureMechanismResultView() { DataGridViewControl.AddCellFormattingHandler(OnCellFormatting); - - AddDataGridColumns(); } protected override object CreateFailureMechanismSectionResultRow(WaveImpactAsphaltCoverFailureMechanismSectionResult sectionResult) @@ -56,16 +54,11 @@ base.Dispose(disposing); } - private void AddDataGridColumns() + protected override void AddDataGridColumns() { + base.AddDataGridColumns(); + DataGridViewControl.AddTextBoxColumn( - TypeUtils.GetMemberName(sr => sr.Name), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name, - true); - DataGridViewControl.AddCheckBoxColumn( - TypeUtils.GetMemberName(sr => sr.AssessmentLayerOne), - RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one); - DataGridViewControl.AddTextBoxColumn( TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA), RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a); DataGridViewControl.AddTextBoxColumn( Index: Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/Ringtoets.WaveImpactAsphaltCover.Forms.Test.csproj =================================================================== diff -u -rf718135c08ce7b90cc0eaf40bfb83c9af48a1776 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/Ringtoets.WaveImpactAsphaltCover.Forms.Test.csproj (.../Ringtoets.WaveImpactAsphaltCover.Forms.Test.csproj) (revision f718135c08ce7b90cc0eaf40bfb83c9af48a1776) +++ Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/Ringtoets.WaveImpactAsphaltCover.Forms.Test.csproj (.../Ringtoets.WaveImpactAsphaltCover.Forms.Test.csproj) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -139,6 +139,10 @@ {4843D6E5-066F-4795-94F5-1D53932DD03C} Ringtoets.Common.Data.TestUtil + + {d24fa2f7-28a7-413b-afd3-ee10e985630b} + Ringtoets.Common.Forms.TestUtil + {70F8CC9C-5BC8-4FB2-B201-EAE7FA8088C2} Ringtoets.HydraRing.Data Index: Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/Views/WaveImpactAsphaltCoverFailureMechanismResultViewTest.cs =================================================================== diff -u -r2973c5f790a5131e427bd5f73e2a620044199639 -re38a7c2baca2872af6319d535c6468133ea31fbc --- Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/Views/WaveImpactAsphaltCoverFailureMechanismResultViewTest.cs (.../WaveImpactAsphaltCoverFailureMechanismResultViewTest.cs) (revision 2973c5f790a5131e427bd5f73e2a620044199639) +++ Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/Views/WaveImpactAsphaltCoverFailureMechanismResultViewTest.cs (.../WaveImpactAsphaltCoverFailureMechanismResultViewTest.cs) (revision e38a7c2baca2872af6319d535c6468133ea31fbc) @@ -20,17 +20,16 @@ // All rights reserved. using System; -using System.Drawing; using System.Windows.Forms; using Core.Common.Base.Data; using Core.Common.Base.Geometry; using NUnit.Extensions.Forms; using NUnit.Framework; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.TestUtil; using Ringtoets.WaveImpactAsphaltCover.Data; using Ringtoets.WaveImpactAsphaltCover.Forms.Views; -using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.WaveImpactAsphaltCover.Forms.Test.Views { @@ -58,13 +57,13 @@ Assert.AreEqual(4, dataGridView.ColumnCount); - Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); + Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerOneIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerTwoAIndex]); Assert.IsInstanceOf(dataGridView.Columns[assessmentLayerThreeIndex]); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one, dataGridView.Columns[assessmentLayerOneIndex].HeaderText); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a, dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); - Assert.AreEqual(RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three, dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); + Assert.AreEqual("Toetslaag 1", dataGridView.Columns[assessmentLayerOneIndex].HeaderText); + Assert.AreEqual("Toetslaag 2a", dataGridView.Columns[assessmentLayerTwoAIndex].HeaderText); + Assert.AreEqual("Toetslaag 3", dataGridView.Columns[assessmentLayerThreeIndex].HeaderText); Assert.AreEqual(DataGridViewAutoSizeColumnsMode.AllCells, dataGridView.AutoSizeColumnsMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, dataGridView.ColumnHeadersDefaultCellStyle.Alignment); @@ -84,19 +83,30 @@ { new Point2D(0, 0) }); + var section3 = new FailureMechanismSection("Section 3", new[] + { + new Point2D(0, 0) + }); + Random random = new Random(21); var result1 = new WaveImpactAsphaltCoverFailureMechanismSectionResult(section1) { - AssessmentLayerOne = true, + AssessmentLayerOne = AssessmentLayerOneState.Sufficient, AssessmentLayerTwoA = (RoundedDouble) random.NextDouble(), AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; var result2 = new WaveImpactAsphaltCoverFailureMechanismSectionResult(section2) { - AssessmentLayerOne = false, + AssessmentLayerOne = AssessmentLayerOneState.NotAssessed, AssessmentLayerTwoA = (RoundedDouble) random.NextDouble(), AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; + var result3 = new WaveImpactAsphaltCoverFailureMechanismSectionResult(section3) + { + AssessmentLayerOne = AssessmentLayerOneState.NeedsDetailedAssessment, + AssessmentLayerTwoA = (RoundedDouble) random.NextDouble(), + AssessmentLayerThree = (RoundedDouble) random.NextDouble() + }; using (var form = new Form()) { @@ -109,13 +119,14 @@ view.Data = new[] { result1, - result2 + result2, + result3 }; // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; var rows = dataGridView.Rows; - Assert.AreEqual(2, rows.Count); + Assert.AreEqual(3, rows.Count); var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); @@ -124,8 +135,8 @@ Assert.AreEqual(result1.AssessmentLayerTwoA.ToString(), cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual(result1.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); cells = rows[1].Cells; Assert.AreEqual(4, cells.Count); @@ -134,14 +145,27 @@ Assert.AreEqual(result2.AssessmentLayerTwoA.ToString(), cells[assessmentLayerTwoAIndex].FormattedValue); Assert.AreEqual(result2.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); - AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); + + cells = rows[2].Cells; + Assert.AreEqual(4, cells.Count); + Assert.AreEqual("Section 3", cells[nameColumnIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerOne, cells[assessmentLayerOneIndex].Value); + Assert.AreEqual(result3.AssessmentLayerTwoA.ToString(), cells[assessmentLayerTwoAIndex].FormattedValue); + Assert.AreEqual(result3.AssessmentLayerThree.ToString(), cells[assessmentLayerThreeIndex].FormattedValue); + + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsEnabled(cells[assessmentLayerThreeIndex]); } } } [Test] - public void GivenFormWithSimpleFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled() + [TestCase(AssessmentLayerOneState.NotAssessed)] + [TestCase(AssessmentLayerOneState.NeedsDetailedAssessment)] + public void GivenFormWithSimpleFailureMechanismResultView_WhenSectionPassesLevel0AndListenersNotified_ThenRowsForSectionBecomesDisabled( + AssessmentLayerOneState assessmentLayerOneState) { // Given var section = new FailureMechanismSection("Section 1", new[] @@ -151,7 +175,7 @@ Random random = new Random(21); var result = new WaveImpactAsphaltCoverFailureMechanismSectionResult(section) { - AssessmentLayerOne = false, + AssessmentLayerOne = assessmentLayerOneState, AssessmentLayerTwoA = (RoundedDouble) random.NextDouble(), AssessmentLayerThree = (RoundedDouble) random.NextDouble() }; @@ -168,7 +192,7 @@ }; // When - result.AssessmentLayerOne = true; + result.AssessmentLayerOne = AssessmentLayerOneState.Sufficient; result.NotifyObservers(); // Then @@ -179,8 +203,8 @@ var cells = rows[0].Cells; Assert.AreEqual(4, cells.Count); - AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); - AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerTwoAIndex]); + DataGridViewCellTester.AssertCellIsDisabled(cells[assessmentLayerThreeIndex]); } } } @@ -221,19 +245,5 @@ } } } - - private void AssertCellIsDisabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(true, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.GrayText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.DarkGray), dataGridViewCell.Style.BackColor); - } - - private void AssertCellIsEnabled(DataGridViewCell dataGridViewCell) - { - Assert.AreEqual(false, dataGridViewCell.ReadOnly); - Assert.AreEqual(Color.FromKnownColor(KnownColor.ControlText), dataGridViewCell.Style.ForeColor); - Assert.AreEqual(Color.FromKnownColor(KnownColor.White), dataGridViewCell.Style.BackColor); - } } } \ No newline at end of file