public void CreateExportableCombinedSectionAssemblyCollection_AssessmentSectionNull_ThrowsArgumentNullException() { // Call void Call() => ExportableCombinedSectionAssemblyFactory.CreateExportableCombinedSectionAssemblyCollection( Enumerable.Empty <CombinedFailureMechanismSectionAssemblyResult>(), null); // Assert var exception = Assert.Throws <ArgumentNullException>(Call); Assert.AreEqual("assessmentSection", exception.ParamName); }
public void CreateExportableCombinedSectionAssemblyCollection_CombinedSectionAssemblyResultsNull_ThrowsArgumentNullException() { // Call void Call() => ExportableCombinedSectionAssemblyFactory.CreateExportableCombinedSectionAssemblyCollection( null, new AssessmentSection(AssessmentSectionComposition.Dike)); // Assert var exception = Assert.Throws <ArgumentNullException>(Call); Assert.AreEqual("combinedSectionAssemblyResults", exception.ParamName); }
public void CreateExportableCombinedSectionAssemblyCollection_WithAssemblyResults_ReturnsExportableCombinedSectionAssemblyCollection(bool hasAssemblyGroupResults) { // Setup var assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike); assessmentSection.ReferenceLine.SetGeometry(new[] { new Point2D(0, 0), new Point2D(2, 2) }); assessmentSection.SpecificFailureMechanisms.AddRange(new[] { new SpecificFailureMechanism { Code = "Nieuw1" }, new SpecificFailureMechanism { Code = "Nieuw2" } }); CombinedFailureMechanismSectionAssemblyResult[] assemblyResults = { CreateCombinedFailureMechanismSectionAssemblyResult(21, hasAssemblyGroupResults), CreateCombinedFailureMechanismSectionAssemblyResult(22, hasAssemblyGroupResults) }; // Call IEnumerable <ExportableCombinedSectionAssembly> exportableCombinedSectionAssemblies = ExportableCombinedSectionAssemblyFactory.CreateExportableCombinedSectionAssemblyCollection(assemblyResults, assessmentSection); // Assert AssertCombinedFailureMechanismSectionAssemblyResults( assemblyResults, exportableCombinedSectionAssemblies, assessmentSection.ReferenceLine, hasAssemblyGroupResults); }