Index: Ringtoets/Integration/src/Ringtoets.Integration.IO/Exporters/AssemblyExporter.cs =================================================================== diff -u --- Ringtoets/Integration/src/Ringtoets.Integration.IO/Exporters/AssemblyExporter.cs (revision 0) +++ Ringtoets/Integration/src/Ringtoets.Integration.IO/Exporters/AssemblyExporter.cs (revision 29144997c6a25b0f71d6348762859c9f848ef587) @@ -0,0 +1,62 @@ +// Copyright (C) Stichting Deltares 2017. 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; +using Core.Common.Base.IO; +using Core.Common.Util; +using Ringtoets.Integration.Data; + +namespace Ringtoets.Integration.IO.Exporters +{ + /// + /// Exports assembly results of the assessment section. + /// + public class AssemblyExporter : IFileExporter + { + private AssessmentSection assessmentSection; + private string filePath; + + /// + /// Creates a new instance of . + /// + /// The to retrieve the assembly results from. + /// The path of the file to export to. + /// Thrown when is null. + /// Thrown when is invalid. + public AssemblyExporter(AssessmentSection assessmentSection, string filePath) + { + if (assessmentSection == null) + { + throw new ArgumentNullException(nameof(assessmentSection)); + } + + IOUtils.ValidateFilePath(filePath); + + this.assessmentSection = assessmentSection; + this.filePath = filePath; + } + + public bool Export() + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file Index: Ringtoets/Integration/src/Ringtoets.Integration.IO/Ringtoets.Integration.IO.csproj =================================================================== diff -u -r3143f826f08381a246a2d7936ece12241b8b1903 -r29144997c6a25b0f71d6348762859c9f848ef587 --- Ringtoets/Integration/src/Ringtoets.Integration.IO/Ringtoets.Integration.IO.csproj (.../Ringtoets.Integration.IO.csproj) (revision 3143f826f08381a246a2d7936ece12241b8b1903) +++ Ringtoets/Integration/src/Ringtoets.Integration.IO/Ringtoets.Integration.IO.csproj (.../Ringtoets.Integration.IO.csproj) (revision 29144997c6a25b0f71d6348762859c9f848ef587) @@ -57,6 +57,7 @@ + Index: Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Exporters/AssemblyExporterTest.cs =================================================================== diff -u --- Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Exporters/AssemblyExporterTest.cs (revision 0) +++ Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Exporters/AssemblyExporterTest.cs (revision 29144997c6a25b0f71d6348762859c9f848ef587) @@ -0,0 +1,80 @@ +// Copyright (C) Stichting Deltares 2017. 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; +using System.IO; +using Core.Common.Base.IO; +using Core.Common.TestUtil; +using NUnit.Framework; +using Ringtoets.Common.Data.AssessmentSection; +using Ringtoets.Integration.Data; +using Ringtoets.Integration.IO.Exporters; + +namespace Ringtoets.Integration.IO.Test.Exporters +{ + [TestFixture] + public class AssemblyExporterTest + { + [Test] + public void Constructor_AssessmentSectionNull_ThrowsArgumentNullException() + { + // Setup + string filePath = TestHelper.GetScratchPadPath(Path.Combine("export", "test.gml")); + + // Call + TestDelegate call = () => new AssemblyExporter(null, filePath); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("assessmentSection", exception.ParamName); + } + + [Test] + public void Constructor_FilePathNull_ThrowsArgumentException() + { + // Setup + var random = new Random(21); + var assessmentSection = new AssessmentSection(random.NextEnumValue()); + + // Call + TestDelegate call = () => new AssemblyExporter(assessmentSection, null); + + // Assert + Assert.Throws(call); + } + + [Test] + public void Constructor_WithValidArguments_ExpectedValues() + { + // Setup + var random = new Random(21); + var assessmentSection = new AssessmentSection(random.NextEnumValue()); + + string filePath = TestHelper.GetScratchPadPath(Path.Combine("export", "test.gml")); + + // Call + var exporter = new AssemblyExporter(assessmentSection, filePath); + + // Assert + Assert.IsInstanceOf(exporter); + } + } +} \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Ringtoets.Integration.IO.Test.csproj =================================================================== diff -u -r3143f826f08381a246a2d7936ece12241b8b1903 -r29144997c6a25b0f71d6348762859c9f848ef587 --- Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Ringtoets.Integration.IO.Test.csproj (.../Ringtoets.Integration.IO.Test.csproj) (revision 3143f826f08381a246a2d7936ece12241b8b1903) +++ Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Ringtoets.Integration.IO.Test.csproj (.../Ringtoets.Integration.IO.Test.csproj) (revision 29144997c6a25b0f71d6348762859c9f848ef587) @@ -59,6 +59,7 @@ +