Index: Ringtoets/Common/src/Ringtoets.Common.IO/HydraRing/HydraRingSettingsDatabaseValidator.cs =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.IO/HydraRing/HydraRingSettingsDatabaseValidator.cs (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.IO/HydraRing/HydraRingSettingsDatabaseValidator.cs (revision e4c8b63e26051b6bd120260482a565a06635743e) @@ -0,0 +1,45 @@ +// 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 Core.Common.Base.IO; +using Core.Common.IO.Readers; + +namespace Ringtoets.Common.IO.HydraRing +{ + /// + /// Validator to validate the Hydra-Ring settings database. + /// + internal class HydraRingSettingsDatabaseValidator : SqLiteDatabaseReaderBase + { + /// + /// Creates a new instance of . + /// + /// The full path to the database file to use when reading settings. + /// Thrown when: + /// + /// The contains invalid characters. + /// No file could be found at . + /// Unable to open database file. + /// + /// + public HydraRingSettingsDatabaseValidator(string databaseFilePath) : base(databaseFilePath) {} + } +} Index: Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj =================================================================== diff -u -re2b91ee0187b6b6ea0f5941bcbfa986eff613612 -re4c8b63e26051b6bd120260482a565a06635743e --- Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj (.../Ringtoets.Common.IO.csproj) (revision e2b91ee0187b6b6ea0f5941bcbfa986eff613612) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Ringtoets.Common.IO.csproj (.../Ringtoets.Common.IO.csproj) (revision e4c8b63e26051b6bd120260482a565a06635743e) @@ -85,6 +85,7 @@ + Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/HydraRing/HydraRingSettingsDatabaseValidatorTest.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/HydraRing/HydraRingSettingsDatabaseValidatorTest.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/HydraRing/HydraRingSettingsDatabaseValidatorTest.cs (revision e4c8b63e26051b6bd120260482a565a06635743e) @@ -0,0 +1,52 @@ +// 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.IO; +using Core.Common.IO.Readers; +using Core.Common.TestUtil; +using NUnit.Framework; +using Ringtoets.Common.IO.HydraRing; + +namespace Ringtoets.Common.IO.Test.HydraRing +{ + [TestFixture] + public class HydraRingSettingsDatabaseValidatorTest + { + private const string testDataSubDirectory = "HydraRingSettingsDatabaseValidator"; + + private static readonly string directoryPath = TestHelper.GetTestDataPath( + TestDataPath.Ringtoets.Common.IO, testDataSubDirectory); + + [Test] + public void Constructor_ExpectedValues() + { + // Setup + string completeDatabasePath = Path.Combine(directoryPath, "withoutPreprocessor.config.sqlite"); + + // Call + using (var validator = new HydraRingSettingsDatabaseValidator(completeDatabasePath)) + { + // Assert + Assert.IsInstanceOf(validator); + } + } + } +} \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj =================================================================== diff -u -re2b91ee0187b6b6ea0f5941bcbfa986eff613612 -re4c8b63e26051b6bd120260482a565a06635743e --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj (.../Ringtoets.Common.IO.Test.csproj) (revision e2b91ee0187b6b6ea0f5941bcbfa986eff613612) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/Ringtoets.Common.IO.Test.csproj (.../Ringtoets.Common.IO.Test.csproj) (revision e4c8b63e26051b6bd120260482a565a06635743e) @@ -86,6 +86,7 @@ + Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/HydraRingSettingsDatabaseValidator/withoutPreprocessor.config.sqlite =================================================================== diff -u Binary files differ