Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/GrassCoverSlipOffOutwardsSectionResultRowTest.cs =================================================================== diff -u -r1a7135a8f4165c2972b8864167f0271dc1737c26 -r7237c90011fccd0ef7d6888fd9a8608f4f9020b3 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/GrassCoverSlipOffOutwardsSectionResultRowTest.cs (.../GrassCoverSlipOffOutwardsSectionResultRowTest.cs) (revision 1a7135a8f4165c2972b8864167f0271dc1737c26) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/GrassCoverSlipOffOutwardsSectionResultRowTest.cs (.../GrassCoverSlipOffOutwardsSectionResultRowTest.cs) (revision 7237c90011fccd0ef7d6888fd9a8608f4f9020b3) @@ -42,7 +42,39 @@ [TestFixture] public class GrassCoverSlipOffOutwardsSectionResultRowTest { + private static GrassCoverSlipOffOutwardsSectionResultRow.ConstructionProperties ConstructionProperties + { + get + { + return new GrassCoverSlipOffOutwardsSectionResultRow.ConstructionProperties + { + SimpleAssessmentResultIndex = 1, + DetailedAssessmentResultIndex = 2, + TailorMadeAssessmentResultIndex = 3, + SimpleAssemblyCategoryGroupIndex = 4, + DetailedAssemblyCategoryGroupIndex = 5, + TailorMadeAssemblyCategoryGroupIndex = 6, + CombinedAssemblyCategoryGroupIndex = 7, + ManualAssemblyCategoryGroupIndex = 9 + }; + } + } + [Test] + public void Constructor_ConstructionPropertiesNull_ThrowsArgumentNullException() + { + FailureMechanismSection section = FailureMechanismSectionTestFactory.CreateFailureMechanismSection(); + var result = new GrassCoverSlipOffOutwardsFailureMechanismSectionResult(section); + + // Call + TestDelegate test = () => new GrassCoverSlipOffOutwardsSectionResultRow(result, null); + + // Assert + var exception = Assert.Throws(test); + Assert.AreEqual("constructionProperties", exception.ParamName); + } + + [Test] public void Constructor_WithParameters_ExpectedValues() { // Setup @@ -52,7 +84,7 @@ using (new AssemblyToolCalculatorFactoryConfig()) { // Call - var row = new GrassCoverSlipOffOutwardsSectionResultRow(result); + var row = new GrassCoverSlipOffOutwardsSectionResultRow(result, ConstructionProperties); // Assert Assert.IsInstanceOf>(row); @@ -85,7 +117,7 @@ calculator.CombinedAssemblyCategoryOutput = random.NextEnumValue(); // Call - var row = new GrassCoverSlipOffOutwardsSectionResultRow(result); + var row = new GrassCoverSlipOffOutwardsSectionResultRow(result, ConstructionProperties); // Assert Assert.AreEqual(FailureMechanismSectionResultRowHelper.GetCategoryGroupDisplayname(calculator.SimpleAssessmentAssemblyOutput.Group), @@ -116,7 +148,7 @@ using (new AssemblyToolCalculatorFactoryConfig()) { - var row = new GrassCoverSlipOffOutwardsSectionResultRow(result); + var row = new GrassCoverSlipOffOutwardsSectionResultRow(result, ConstructionProperties); // Precondition Assert.IsFalse(result.UseManualAssemblyCategoryGroup); @@ -148,7 +180,7 @@ using (new AssemblyToolCalculatorFactoryConfig()) { - var row = new GrassCoverSlipOffOutwardsSectionResultRow(result); + var row = new GrassCoverSlipOffOutwardsSectionResultRow(result, ConstructionProperties); // Call row.ManualAssemblyCategoryGroup = newValue; @@ -180,7 +212,7 @@ using (new AssemblyToolCalculatorFactoryConfig()) { - var row = new GrassCoverSlipOffOutwardsSectionResultRow(result); + var row = new GrassCoverSlipOffOutwardsSectionResultRow(result, ConstructionProperties); // Call row.SimpleAssessmentResult = newValue; @@ -209,7 +241,7 @@ using (new AssemblyToolCalculatorFactoryConfig()) { - var row = new GrassCoverSlipOffOutwardsSectionResultRow(result); + var row = new GrassCoverSlipOffOutwardsSectionResultRow(result, ConstructionProperties); // Call row.DetailedAssessmentResult = newValue; @@ -238,7 +270,7 @@ using (new AssemblyToolCalculatorFactoryConfig()) { - var row = new GrassCoverSlipOffOutwardsSectionResultRow(result); + var row = new GrassCoverSlipOffOutwardsSectionResultRow(result, ConstructionProperties); // Call row.TailorMadeAssessmentResult = newValue;