Index: Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResult.cs =================================================================== diff -u -rbe21f600bbe0e55f5ab9ca4a7b1162d37a1b25b2 -r9e7d412c1e0f7161e5cd10385f203aed85a3424f --- Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResult.cs (.../ExportableAggregatedFailureMechanismSectionAssemblyResult.cs) (revision be21f600bbe0e55f5ab9ca4a7b1162d37a1b25b2) +++ Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResult.cs (.../ExportableAggregatedFailureMechanismSectionAssemblyResult.cs) (revision 9e7d412c1e0f7161e5cd10385f203aed85a3424f) @@ -6,7 +6,8 @@ /// /// Class that holds all the information to export a failure mechanism section assembly result. /// - public class ExportableAggregatedFailureMechanismSectionAssemblyResult + public class ExportableAggregatedFailureMechanismSectionAssemblyResult : + ExportableAggregatedFailureMechanismSectionAssemblyResultBase { /// /// Creates a new instance of . @@ -17,67 +18,24 @@ /// The tailor made assembly result of the failure mechanism section. /// The combined assembly result of the failure mechanism section. /// Thrown when any parameter is null. - public ExportableAggregatedFailureMechanismSectionAssemblyResult(FailureMechanismSection failureMechanismSection, - ExportableSectionAssemblyResult simpleAssembly, - ExportableSectionAssemblyResult detailedAssembly, - ExportableSectionAssemblyResult tailorMadeAssembly, + public ExportableAggregatedFailureMechanismSectionAssemblyResult(FailureMechanismSection failureMechanismSection, + ExportableSectionAssemblyResult simpleAssembly, + ExportableSectionAssemblyResult detailedAssembly, + ExportableSectionAssemblyResult tailorMadeAssembly, ExportableSectionAssemblyResult combinedAssembly) + : base(failureMechanismSection, simpleAssembly, tailorMadeAssembly, combinedAssembly) { - if (failureMechanismSection == null) - { - throw new ArgumentNullException(nameof(failureMechanismSection)); - } - - if (simpleAssembly == null) - { - throw new ArgumentNullException(nameof(simpleAssembly)); - } - if (detailedAssembly == null) { throw new ArgumentNullException(nameof(detailedAssembly)); } - if (tailorMadeAssembly == null) - { - throw new ArgumentNullException(nameof(tailorMadeAssembly)); - } - - if (combinedAssembly == null) - { - throw new ArgumentNullException(nameof(combinedAssembly)); - } - - FailureMechanismSection = failureMechanismSection; - SimpleAssembly = simpleAssembly; DetailedAssembly = detailedAssembly; - TailorMadeAssembly = tailorMadeAssembly; - CombinedAssembly = combinedAssembly; } /// - /// Gets the failure mechanism section. - /// - public FailureMechanismSection FailureMechanismSection { get; } - - /// - /// Gets the simple assembly result. - /// - public ExportableSectionAssemblyResult SimpleAssembly { get; } - - /// /// Gets the detailed assembly result. /// public ExportableSectionAssemblyResult DetailedAssembly { get; } - - /// - /// Gets the tailor made assembly result. - /// - public ExportableSectionAssemblyResult TailorMadeAssembly { get; } - - /// - /// Gets the combined assembly result. - /// - public ExportableSectionAssemblyResult CombinedAssembly { get; } } } \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability.cs =================================================================== diff -u -rbe21f600bbe0e55f5ab9ca4a7b1162d37a1b25b2 -r9e7d412c1e0f7161e5cd10385f203aed85a3424f --- Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability.cs (.../ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability.cs) (revision be21f600bbe0e55f5ab9ca4a7b1162d37a1b25b2) +++ Ringtoets/Integration/src/Ringtoets.Integration.IO/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability.cs (.../ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability.cs) (revision 9e7d412c1e0f7161e5cd10385f203aed85a3424f) @@ -6,7 +6,8 @@ /// /// Class that holds all the information to export a failure mechanism section assembly result with probability. /// - public class ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability + public class ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability : + ExportableAggregatedFailureMechanismSectionAssemblyResultBase { /// /// Creates a new instance of . @@ -22,62 +23,19 @@ ExportableSectionAssemblyResultWithProbability detailedAssembly, ExportableSectionAssemblyResultWithProbability tailorMadeAssembly, ExportableSectionAssemblyResultWithProbability combinedAssembly) + : base(failureMechanismSection, simpleAssembly, tailorMadeAssembly, combinedAssembly) { - if (failureMechanismSection == null) - { - throw new ArgumentNullException(nameof(failureMechanismSection)); - } - - if (simpleAssembly == null) - { - throw new ArgumentNullException(nameof(simpleAssembly)); - } - if (detailedAssembly == null) { throw new ArgumentNullException(nameof(detailedAssembly)); } - if (tailorMadeAssembly == null) - { - throw new ArgumentNullException(nameof(tailorMadeAssembly)); - } - - if (combinedAssembly == null) - { - throw new ArgumentNullException(nameof(combinedAssembly)); - } - - FailureMechanismSection = failureMechanismSection; - SimpleAssembly = simpleAssembly; DetailedAssembly = detailedAssembly; - TailorMadeAssembly = tailorMadeAssembly; - CombinedAssembly = combinedAssembly; } /// - /// Gets the failure mechanism section. - /// - public FailureMechanismSection FailureMechanismSection { get; } - - /// - /// Gets the simple assembly result. - /// - public ExportableSectionAssemblyResultWithProbability SimpleAssembly { get; } - - /// /// Gets the detailed assembly result. /// public ExportableSectionAssemblyResultWithProbability DetailedAssembly { get; } - - /// - /// Gets the tailor made assembly result. - /// - public ExportableSectionAssemblyResultWithProbability TailorMadeAssembly { get; } - - /// - /// Gets the combined assembly result. - /// - public ExportableSectionAssemblyResultWithProbability CombinedAssembly { get; } } } \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultTest.cs =================================================================== diff -u -r317d9ca8e3c59fd481ec2d4183742b528241127d -r9e7d412c1e0f7161e5cd10385f203aed85a3424f --- Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultTest.cs (.../ExportableAggregatedFailureMechanismSectionAssemblyResultTest.cs) (revision 317d9ca8e3c59fd481ec2d4183742b528241127d) +++ Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultTest.cs (.../ExportableAggregatedFailureMechanismSectionAssemblyResultTest.cs) (revision 9e7d412c1e0f7161e5cd10385f203aed85a3424f) @@ -12,37 +12,6 @@ public class ExportableAggregatedFailureMechanismSectionAssemblyResultTest { [Test] - public void Constructor_FailureMechanismSectionNull_ThrowsArgumentNullException() - { - // Call - TestDelegate call = () => new ExportableAggregatedFailureMechanismSectionAssemblyResult(null, - CreateSectionResult(), - CreateSectionResult(), - CreateSectionResult(), - CreateSectionResult()); - - // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("failureMechanismSection", exception.ParamName); - } - - [Test] - public void Constructor_SimpleAssemblyNull_ThrowsArgumentNullException() - { - // Call - TestDelegate call = () => new ExportableAggregatedFailureMechanismSectionAssemblyResult( - FailureMechanismSectionTestFactory.CreateFailureMechanismSection(), - null, - CreateSectionResult(), - CreateSectionResult(), - CreateSectionResult()); - - // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("simpleAssembly", exception.ParamName); - } - - [Test] public void Constructor_DetailedAssemblyNull_ThrowsArgumentNullException() { // Call @@ -59,38 +28,6 @@ } [Test] - public void Constructor_TailorMadeAssemblyNull_ThrowsArgumentNullException() - { - // Call - TestDelegate call = () => new ExportableAggregatedFailureMechanismSectionAssemblyResult( - FailureMechanismSectionTestFactory.CreateFailureMechanismSection(), - CreateSectionResult(), - CreateSectionResult(), - null, - CreateSectionResult()); - - // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("tailorMadeAssembly", exception.ParamName); - } - - [Test] - public void Constructor_CombinedAssemblyNull_ThrowsArgumentNullException() - { - // Call - TestDelegate call = () => new ExportableAggregatedFailureMechanismSectionAssemblyResult( - FailureMechanismSectionTestFactory.CreateFailureMechanismSection(), - CreateSectionResult(), - CreateSectionResult(), - CreateSectionResult(), - null); - - // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("combinedAssembly", exception.ParamName); - } - - [Test] public void Constructor_ExpectedValues() { // Setup @@ -108,6 +45,8 @@ combinedAssembly); // Assert + Assert.IsInstanceOf>(assemblyResult); + Assert.AreSame(failureMechanismSection, assemblyResult.FailureMechanismSection); Assert.AreSame(simpleAssembly, assemblyResult.SimpleAssembly); Assert.AreSame(detailedAssembly, assemblyResult.DetailedAssembly); Index: Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbabilityTest.cs =================================================================== diff -u -re26a1087fab8d758f2c451a6ed79879c780acb56 -r9e7d412c1e0f7161e5cd10385f203aed85a3424f --- Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbabilityTest.cs (.../ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbabilityTest.cs) (revision e26a1087fab8d758f2c451a6ed79879c780acb56) +++ Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Assembly/ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbabilityTest.cs (.../ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbabilityTest.cs) (revision 9e7d412c1e0f7161e5cd10385f203aed85a3424f) @@ -12,37 +12,6 @@ public class ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbabilityTest { [Test] - public void Constructor_FailureMechanismSectionNull_ThrowsArgumentNullException() - { - // Call - TestDelegate call = () => new ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability(null, - CreateSectionResult(), - CreateSectionResult(), - CreateSectionResult(), - CreateSectionResult()); - - // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("failureMechanismSection", exception.ParamName); - } - - [Test] - public void Constructor_SimpleAssemblyNull_ThrowsArgumentNullException() - { - // Call - TestDelegate call = () => new ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability( - FailureMechanismSectionTestFactory.CreateFailureMechanismSection(), - null, - CreateSectionResult(), - CreateSectionResult(), - CreateSectionResult()); - - // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("simpleAssembly", exception.ParamName); - } - - [Test] public void Constructor_DetailedAssemblyNull_ThrowsArgumentNullException() { // Call @@ -59,38 +28,6 @@ } [Test] - public void Constructor_TailorMadeAssemblyNull_ThrowsArgumentNullException() - { - // Call - TestDelegate call = () => new ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability( - FailureMechanismSectionTestFactory.CreateFailureMechanismSection(), - CreateSectionResult(), - CreateSectionResult(), - null, - CreateSectionResult()); - - // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("tailorMadeAssembly", exception.ParamName); - } - - [Test] - public void Constructor_CombinedAssemblyNull_ThrowsArgumentNullException() - { - // Call - TestDelegate call = () => new ExportableAggregatedFailureMechanismSectionAssemblyResultWithProbability( - FailureMechanismSectionTestFactory.CreateFailureMechanismSection(), - CreateSectionResult(), - CreateSectionResult(), - CreateSectionResult(), - null); - - // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("combinedAssembly", exception.ParamName); - } - - [Test] public void Constructor_ExpectedValues() { // Setup @@ -108,6 +45,8 @@ combinedAssembly); // Assert + Assert.IsInstanceOf>(assemblyResult); + Assert.AreSame(failureMechanismSection, assemblyResult.FailureMechanismSection); Assert.AreSame(simpleAssembly, assemblyResult.SimpleAssembly); Assert.AreSame(detailedAssembly, assemblyResult.DetailedAssembly);