Index: Riskeer/Integration/test/Riskeer.Integration.Data.Test/Assembly/CombinedFailureMechanismSectionAssemblyResultTest.cs =================================================================== diff -u -r89039d4a60d80904883f2ea76f98108595a9accf -rf4e64596a3417fbda8272ff2460e99bb6500c5f0 --- Riskeer/Integration/test/Riskeer.Integration.Data.Test/Assembly/CombinedFailureMechanismSectionAssemblyResultTest.cs (.../CombinedFailureMechanismSectionAssemblyResultTest.cs) (revision 89039d4a60d80904883f2ea76f98108595a9accf) +++ Riskeer/Integration/test/Riskeer.Integration.Data.Test/Assembly/CombinedFailureMechanismSectionAssemblyResultTest.cs (.../CombinedFailureMechanismSectionAssemblyResultTest.cs) (revision f4e64596a3417fbda8272ff2460e99bb6500c5f0) @@ -84,7 +84,7 @@ } [Test] - public void Constructor_WithConstructionProperties_ExpectedValues() + public void Constructor_WithConstructionPropertiesRepresentingAllFailureMechanismsInAssembly_ExpectedValues() { // Setup var random = new Random(21); @@ -151,5 +151,59 @@ Assert.AreEqual(stabilityPointStructuresResult, result.StabilityPointStructures); Assert.AreEqual(duneErosionResult, result.DuneErosion); } + + [Test] + public void Constructor_WithConstructionPropertiesRepresentingAllFailureMechanismsNotInAssembly_ExpectedValues() + { + // Setup + var random = new Random(21); + int sectionNumber = random.Next(); + double sectionStart = random.NextDouble(); + double sectionEnd = random.NextDouble(); + var totalResult = random.NextEnumValue(); + + // Call + var result = new CombinedFailureMechanismSectionAssemblyResult( + sectionNumber, sectionStart, sectionEnd, totalResult, + new CombinedFailureMechanismSectionAssemblyResult.ConstructionProperties + { + Piping = null, + GrassCoverErosionInwards = null, + MacroStabilityInwards = null, + Microstability = null, + StabilityStoneCover = null, + WaveImpactAsphaltCover = null, + WaterPressureAsphaltCover = null, + GrassCoverErosionOutwards = null, + GrassCoverSlipOffOutwards = null, + GrassCoverSlipOffInwards = null, + HeightStructures = null, + ClosingStructures = null, + PipingStructure = null, + StabilityPointStructures = null, + DuneErosion = null + }); + + // Assert + Assert.AreEqual(sectionNumber, result.SectionNumber); + Assert.AreEqual(sectionStart, result.SectionStart); + Assert.AreEqual(sectionEnd, result.SectionEnd); + Assert.AreEqual(totalResult, result.TotalResult); + Assert.IsNull(result.Piping); + Assert.IsNull(result.GrassCoverErosionInwards); + Assert.IsNull(result.MacroStabilityInwards); + Assert.IsNull(result.Microstability); + Assert.IsNull(result.StabilityStoneCover); + Assert.IsNull(result.WaveImpactAsphaltCover); + Assert.IsNull(result.WaterPressureAsphaltCover); + Assert.IsNull(result.GrassCoverErosionOutwards); + Assert.IsNull(result.GrassCoverSlipOffOutwards); + Assert.IsNull(result.GrassCoverSlipOffInwards); + Assert.IsNull(result.HeightStructures); + Assert.IsNull(result.ClosingStructures); + Assert.IsNull(result.PipingStructure); + Assert.IsNull(result.StabilityPointStructures); + Assert.IsNull(result.DuneErosion); + } } } \ No newline at end of file