// 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.Collections.Generic; using System.Linq; using Core.Common.Base.Geometry; using Ringtoets.Common.Data.DikeProfiles; namespace Ringtoets.Common.Data.TestUtil { /// /// Simple foreshore profile that can be used for testing. /// public class TestForeshoreProfile : ForeshoreProfile { /// /// Creates a new instance of the at a specified /// . /// /// Location of the profile. public TestForeshoreProfile(Point2D worldReferencePoint) : this("id", null, worldReferencePoint, null, Enumerable.Empty()) {} /// /// Creates a new instance of . /// /// If true, create the ForeshoreProfile with a default . public TestForeshoreProfile(bool useBreakWater = false) : this("id", null, new Point2D(0, 0), useBreakWater ? new BreakWater(BreakWaterType.Dam, 10) : null, Enumerable.Empty()) {} /// /// Creates a new instance of the with a given /// name and no . /// /// Id of the profile. public TestForeshoreProfile(string profileId) : this(profileId, "name", new Point2D(0, 0), null, Enumerable.Empty()) {} /// /// Creates a new instance of the with a given /// name and id and no . /// /// Name of the profile. /// The id of the profile. /// Thrown when /// is null, empty or whitespaces. public TestForeshoreProfile(string profileName, string id) : this(id, profileName, new Point2D(0, 0), null, Enumerable.Empty()) {} /// /// Creates a new instance of the with a given /// name and geometry. /// /// Name of the profile. /// The geometry of the profile. public TestForeshoreProfile(string profileId, IEnumerable geometry) : this(profileId, "name", new Point2D(0, 0), null, geometry) {} /// /// Creates a new instance of with a specified . /// /// The which needs to be set on the . public TestForeshoreProfile(BreakWater breakWater) : this("id", null, new Point2D(0, 0), breakWater, Enumerable.Empty()) {} /// /// Creates a new instance of with a specified geometry. /// /// The geometry of the profile. public TestForeshoreProfile(IEnumerable geometry) : this("id", null, new Point2D(0, 0), null, geometry) {} /// /// Creates a new instance of with a specified geometry and id. /// /// The geometry of the profile. /// The id of the foreshore profile. /// Thrown when /// is null, empty or whitespaces. public TestForeshoreProfile(IEnumerable geometry, string id) : this(id, null, new Point2D(0, 0), null, geometry) {} /// /// Instantiates a with given properties. /// /// The id of the foreshore profile. /// The name of the foreshore profile. /// The location of the foreshore profile. /// The breakwater of the foreshore profile. /// The geometry of the foreshore profile. /// Thrown when: /// /// is null. /// is null, empty or whitespaces. /// private TestForeshoreProfile(string id, string profileName, Point2D worldCoordinate, BreakWater breakWater, IEnumerable geometry) : base(worldCoordinate, geometry, breakWater, new ConstructionProperties { Id = id, Name = profileName }) {} } }